diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2020-01-03 12:28:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-03 23:26:07 +0300 |
commit | d2e9d229cfbd73baf33a817a0212233cea7df59a (patch) | |
tree | d1acf8d2e2890e6efc6c34af76193fc502341bab | |
parent | 1f623431100138ffaaae36e122f2727c13de640a (diff) | |
download | linux-d2e9d229cfbd73baf33a817a0212233cea7df59a.tar.xz |
l2tp: Remove redundant BUG_ON() check in l2tp_pernet
Passing NULL to l2tp_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>
-rw-r--r-- | net/l2tp/l2tp_core.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index f82ea12bac37..c99223cb3338 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -122,8 +122,6 @@ static inline struct l2tp_tunnel *l2tp_tunnel(struct sock *sk) static inline struct l2tp_net *l2tp_pernet(const struct net *net) { - BUG_ON(!net); - return net_generic(net, l2tp_net_id); } |