* [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet
@ 2019-12-05 23:04 Aditya Pakki
2019-12-07 19:52 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Pakki @ 2019-12-05 23:04 UTC (permalink / raw)
To: pakki001; +Cc: kjlu, Michal Ostrowski, David S. Miller, netdev, linux-kernel
Passing NULL to pppoe_pernet causes a crash via BUG_ON.
Dereferencing net in net_generici() also has the same effect. This patch
removes the redundant BUG_ON check on the same parameter.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
drivers/net/ppp/pppoe.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index a44dd3c8af63..d760a36db28c 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -119,8 +119,6 @@ static inline bool stage_session(__be16 sid)
static inline struct pppoe_net *pppoe_pernet(struct net *net)
{
- BUG_ON(!net);
-
return net_generic(net, pppoe_net_id);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet
2019-12-05 23:04 [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet Aditya Pakki
@ 2019-12-07 19:52 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-12-07 19:52 UTC (permalink / raw)
To: pakki001; +Cc: kjlu, mostrows, netdev, linux-kernel
From: Aditya Pakki <pakki001@umn.edu>
Date: Thu, 5 Dec 2019 17:04:49 -0600
> Passing NULL to pppoe_pernet causes a crash via BUG_ON.
> Dereferencing net in net_generici() also has the same effect. This patch
> removes the redundant BUG_ON check on the same parameter.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet
2019-12-05 23:03 Aditya Pakki
2019-12-05 23:05 ` David Miller
@ 2019-12-06 14:56 ` Guillaume Nault
1 sibling, 0 replies; 5+ messages in thread
From: Guillaume Nault @ 2019-12-06 14:56 UTC (permalink / raw)
To: Aditya Pakki
Cc: klju, Michal Ostrowski, David S. Miller, netdev, linux-kernel
On Thu, Dec 05, 2019 at 05:03:42PM -0600, Aditya Pakki wrote:
> Passing NULL to pppoe_pernet causes a crash via BUG_ON.
> Dereferencing net in net_generici() also has the same effect. This patch
> removes the redundant BUG_ON check on the same parameter.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> drivers/net/ppp/pppoe.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
> index a44dd3c8af63..d760a36db28c 100644
> --- a/drivers/net/ppp/pppoe.c
> +++ b/drivers/net/ppp/pppoe.c
> @@ -119,8 +119,6 @@ static inline bool stage_session(__be16 sid)
>
> static inline struct pppoe_net *pppoe_pernet(struct net *net)
> {
> - BUG_ON(!net);
> -
> return net_generic(net, pppoe_net_id);
> }
>
Looks like a net-next patch, but net-next is currently closed (take a
look Documentation/networking/netdev-FAQ.rst for details).
You can add my ack when you repost:
Acked-by: Guillaume Nault <gnault@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet
2019-12-05 23:03 Aditya Pakki
@ 2019-12-05 23:05 ` David Miller
2019-12-06 14:56 ` Guillaume Nault
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2019-12-05 23:05 UTC (permalink / raw)
To: pakki001; +Cc: klju, mostrows, netdev, linux-kernel
Why are you sending this twice?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet
@ 2019-12-05 23:03 Aditya Pakki
2019-12-05 23:05 ` David Miller
2019-12-06 14:56 ` Guillaume Nault
0 siblings, 2 replies; 5+ messages in thread
From: Aditya Pakki @ 2019-12-05 23:03 UTC (permalink / raw)
To: pakki001; +Cc: klju, Michal Ostrowski, David S. Miller, netdev, linux-kernel
Passing NULL to pppoe_pernet causes a crash via BUG_ON.
Dereferencing net in net_generici() also has the same effect. This patch
removes the redundant BUG_ON check on the same parameter.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
drivers/net/ppp/pppoe.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index a44dd3c8af63..d760a36db28c 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -119,8 +119,6 @@ static inline bool stage_session(__be16 sid)
static inline struct pppoe_net *pppoe_pernet(struct net *net)
{
- BUG_ON(!net);
-
return net_generic(net, pppoe_net_id);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-07 19:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 23:04 [PATCH] pppoe: remove redundant BUG_ON() check in pppoe_pernet Aditya Pakki
2019-12-07 19:52 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2019-12-05 23:03 Aditya Pakki
2019-12-05 23:05 ` David Miller
2019-12-06 14:56 ` Guillaume Nault
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.