Re: [PATCH RESEND 4.9.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
On Jul 1, 2019, at 6:51 PM, David Miller wrote: > I just tried to apply this with "git am" to the current v4.19 -stable > branch and it failed. This is only needed for the v4.9 stable kernel, ndo_busy_poll (and this NPE) went away in kernel 4.11. Sorry, I probably should have called that out m

[PATCH 4.4.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
7fff47b7b ("net: remove support for per driver ndo_busy_poll()") indirectly fixed this upstream in linux-4.11 by removing the offending pointer usage. No other users of napi->dev touch its netdev_ops. Fixes: 8b80cda536ea ("net: rename include/net/ll_poll.h to include/net/busy_pol

[PATCH RESEND 4.9.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
7fff47b7b ("net: remove support for per driver ndo_busy_poll()") indirectly fixed this upstream in linux-4.11 by removing the offending pointer usage. No other users of napi->dev touch its netdev_ops. Fixes: ce6aea93f751 ("net: network drivers no longer need to implement ndo_busy_pol

Re: [net-next 01/12] i40e: replace switch-statement to speed-up retpoline-enabled builds

2019-04-29 Thread Josh Elsasser
On Apr 29, 2019, at 12:16 PM, Jeff Kirsher wrote: > From: Björn Töpel > > GCC will generate jump tables for switch-statements with more than 5 > case statements. An entry into the jump table is an indirect call, > which means that for CONFIG_RETPOLINE builds, this is rather > expensive. > > Th

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

2019-01-26 Thread Josh Elsasser
us 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 there wa

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 th

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

2019-01-23 Thread Josh Elsasser
can actually 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/rh

Re: [Intel-wired-lan] [PATCH net] ixgbe: recognize 1000BaseLX SFP modules as 1Gbps

2018-11-26 Thread Josh Elsasser
Jeff Kirsher wrote: > No need to re-spin the patch, just reply with the additional "Fixes" > tag and if patchwork does not pick it up, I will add it to the patch I > have in my tree for validation and review. Thanks, let’s try that. Fixes: e23f33367882 ("ixgbe: Fix 1G and 10G link stability for

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 SFP+

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

2018-11-24 Thread Josh Elsasser
quot;) Signed-off-by: Josh Elsasser --- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index 10dbaf4f6e80..9c42f741ed5e 100644 --- a/

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

2018-03-12 Thread Josh Elsasser
quot;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 init_dummy_net

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 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 reproduc

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

2018-03-11 Thread Josh Elsasser
: 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..d0f67d544587 100644 --- a/net/core/dev.c +++ b/net/c