Re: net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
On Jul 1, 2019, at 11:03 AM, Matteo Croce wrote: > Josh, as you are the original author, can you please resend it to -stable? > Feel free to add this tag: > > Tested-by: Matteo Croce For sure. Resent with your Tested-by, along with a second patch that applies to the 4.4.y LTS kernel. I'm

Re: net: check before dereferencing netdev_ops during busy poll

2019-06-28 Thread Josh Elsasser
On Jun 28, 2019, at 3:55 PM, Sasha Levin wrote: > What's the upstream commit id? The commit wasn't needed upstream, as I only sent the original patch after 79e7fff47b7b ("net: remove support for per driver ndo_busy_poll()") had made the fix unnecessary in Linus' tree. May've gotten lost in the

[PATCH net] net: set default network namespace in init_dummy_netdev()

2019-01-26 Thread Josh Elsasser
focus on napi_id instead of socket") Signed-off-by: Josh Elsasser --- net/core/dev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 82f20022259d..d1043d49979c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8712,7 +8712,9 @@ int init_dummy_net

Re: [v2 PATCH] rhashtable: Still do rehash when we get EEXIST

2019-01-26 Thread Josh Elsasser
On Jan 23, 2019, at 7:40 PM, Josh Elsasser wrote: > On Jan 23, 2019, at 7:08 PM, Herbert Xu wrote: > >> Thanks for catching this! >> >> Although I think we should fix this in a different way. The problem >> here is that the shrink cannot proceed because

Re: [v2 PATCH] rhashtable: Still do rehash when we get EEXIST

2019-01-23 Thread Josh Elsasser
On Jan 23, 2019, at 7:08 PM, Herbert Xu wrote: > Thanks for catching this! > > Although I think we should fix this in a different way. The problem > here is that the shrink cannot proceed because there was a previous > rehash that is still incomplete. We should wait for its completion > and

[PATCH net] rhashtable: avoid reschedule loop after rapid growth and shrink

2019-01-23 Thread Josh Elsasser
ly be non-NULL and make forward progress when the hashtable needs to shrink. Fixes: da20420f83ea ("rhashtable: Add nested tables") Signed-off-by: Josh Elsasser --- lib/rhashtable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rhashtable.c b/lib/rhashtable.c

Re: [PATCH net] ixgbe: recognize 1000BaseLX SFP modules as 1Gbps

2018-11-26 Thread Josh Elsasser
Bjørn Mork wrote: > Not that it matters much I guess, but I think LX SFPs were unsupported > at that time. The LX support appears to have been added under the radar > while refactoring ixgbe_setup_sfp_modules_X550em in commit e23f33367882 > ("ixgbe: Fix 1G and 10G link stability for X550EM_x

Re: [PATCH net] ixgbe: recognize 1000BaseLX SFP modules as 1Gbps

2018-11-26 Thread Josh Elsasser
Bjørn Mork wrote: > Not that it matters much I guess, but I think LX SFPs were unsupported > at that time. The LX support appears to have been added under the radar > while refactoring ixgbe_setup_sfp_modules_X550em in commit e23f33367882 > ("ixgbe: Fix 1G and 10G link stability for X550EM_x

[PATCH v2 1/1] net: check before dereferencing netdev_ops during busy poll

2018-03-12 Thread Josh Elsasser
("net: network drivers no longer need to implement ndo_busy_poll()") - 4.9.y Signed-off-by: Josh Elsasser <jelsas...@appneta.com> --- net/core/dev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8898618bf341..1f50c13

[PATCH v2 1/1] net: check before dereferencing netdev_ops during busy poll

2018-03-12 Thread Josh Elsasser
("net: network drivers no longer need to implement ndo_busy_poll()") - 4.9.y Signed-off-by: Josh Elsasser --- net/core/dev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8898618bf341..1f50c131ed15 100644 --- a/net/core/dev.c

[PATCH 0/1] net: avoid a kernel panic during sk_busy_loop

2018-03-12 Thread Josh Elsasser
V2: just check napi->dev->netdev_ops instead of getting clever with the netdev registration state. Original cover letter: Hi Dave, I stumbled across a reproducible kernel panic while playing around with busy_poll on a Linux 4.9.86 kernel. There's an unfortunate interaction between

[PATCH 0/1] net: avoid a kernel panic during sk_busy_loop

2018-03-12 Thread Josh Elsasser
V2: just check napi->dev->netdev_ops instead of getting clever with the netdev registration state. Original cover letter: Hi Dave, I stumbled across a reproducible kernel panic while playing around with busy_poll on a Linux 4.9.86 kernel. There's an unfortunate interaction between

Re: [PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-12 Thread Josh Elsasser
On Mon, Mar 12, 2018 at 4:17 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Sun, Mar 11, 2018 at 12:22 PM, Josh Elsasser <jelsas...@appneta.com> wrote: >> init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads >> to a NULL pointer dereference when

Re: [PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-12 Thread Josh Elsasser
On Mon, Mar 12, 2018 at 4:17 PM, Cong Wang wrote: > On Sun, Mar 11, 2018 at 12:22 PM, Josh Elsasser wrote: >> init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads >> to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi >> wireless adapter

[PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-11 Thread Josh Elsasser
work drivers no longer need to implement ndo_busy_poll()") - 4.9.y Signed-off-by: Josh Elsasser <jelsas...@appneta.com> --- net/core/dev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8898618bf341..d0f67d544587 100644 --- a/net/

[PATCH 0/1] net: avoid a kernel panic during sk_busy_loop

2018-03-11 Thread Josh Elsasser
Hi Dave, I stumbled across a reproducible kernel panic while playing around with busy_poll on a Linux 4.9.86 kernel. There's an unfortunate interaction between init_dummy_netdev, which doesn't bother to fill in netdev_ops, and sk_busy_loop, which assumes netdev_ops is a valid pointer. To

[PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-11 Thread Josh Elsasser
work drivers no longer need to implement ndo_busy_poll()") - 4.9.y Signed-off-by: Josh Elsasser --- net/core/dev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8898618bf341..d0f67d544587 100644 --- a/net/core/dev.c +++ b/net/core/d

[PATCH 0/1] net: avoid a kernel panic during sk_busy_loop

2018-03-11 Thread Josh Elsasser
Hi Dave, I stumbled across a reproducible kernel panic while playing around with busy_poll on a Linux 4.9.86 kernel. There's an unfortunate interaction between init_dummy_netdev, which doesn't bother to fill in netdev_ops, and sk_busy_loop, which assumes netdev_ops is a valid pointer. To