Skip to content

Commit

Permalink
ppp: Remove redundant BUG_ON() check in ppp_pernet
Browse files Browse the repository at this point in the history
Passing NULL to ppp_pernet causes a crash via BUG_ON.
Dereferencing net in net_generic() also has the same effect.
This patch removes the redundant BUG_ON check on the same parameter.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Xu Wang authored and David S. Miller committed Dec 28, 2019
1 parent 36a7886 commit 8a3f44a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ppp/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ static struct class *ppp_class;
/* per net-namespace data */
static inline struct ppp_net *ppp_pernet(struct net *net)
{
BUG_ON(!net);

return net_generic(net, ppp_net_id);
}

Expand Down

0 comments on commit 8a3f44a

Please sign in to comment.