All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Sreedevi Joshi <sreedevi.joshi@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Emil Tantilov <emil.s.tantilov@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2 3/3] idpf: Fix RSS LUT NULL ptr issue after soft reset
Date: Thu, 27 Nov 2025 11:45:17 +0000	[thread overview]
Message-ID: <aSg5zR-6ZYXBuIVd@horms.kernel.org> (raw)
In-Reply-To: <20251124184750.3625097-4-sreedevi.joshi@intel.com>

On Mon, Nov 24, 2025 at 12:47:50PM -0600, Sreedevi Joshi wrote:
> During soft reset, the RSS LUT is freed and not restored unless the
> interface is up. If an ethtool command that accesses the rss lut is
> attempted immediately after reset, it will result in NULL ptr
> dereference. Also, there is no need to reset the rss lut if the soft reset
> does not involve queue count change.
> 
> After soft reset, set the RSS LUT to default values based on the updated
> queue count only if the reset was a result of a queue count change and
> the LUT was not configured by the user. In all other cases, don't touch
> the LUT.
> 
> Steps to reproduce:
> 
> ** Bring the interface down (if up)
> ifconfig eth1 down
> 
> ** update the queue count (eg., 27->20)
> ethtool -L eth1 combined 20
> 
> ** display the RSS LUT
> ethtool -x eth1
> 
> [82375.558338] BUG: kernel NULL pointer dereference, address: 0000000000000000
> [82375.558373] #PF: supervisor read access in kernel mode
> [82375.558391] #PF: error_code(0x0000) - not-present page
> [82375.558408] PGD 0 P4D 0
> [82375.558421] Oops: Oops: 0000 [#1] SMP NOPTI
> <snip>
> [82375.558516] RIP: 0010:idpf_get_rxfh+0x108/0x150 [idpf]
> [82375.558786] Call Trace:
> [82375.558793]  <TASK>
> [82375.558804]  rss_prepare.isra.0+0x187/0x2a0
> [82375.558827]  rss_prepare_data+0x3a/0x50
> [82375.558845]  ethnl_default_doit+0x13d/0x3e0
> [82375.558863]  genl_family_rcv_msg_doit+0x11f/0x180
> [82375.558886]  genl_rcv_msg+0x1ad/0x2b0
> [82375.558902]  ? __pfx_ethnl_default_doit+0x10/0x10
> [82375.558920]  ? __pfx_genl_rcv_msg+0x10/0x10
> [82375.558937]  netlink_rcv_skb+0x58/0x100
> [82375.558957]  genl_rcv+0x2c/0x50
> [82375.558971]  netlink_unicast+0x289/0x3e0
> [82375.558988]  netlink_sendmsg+0x215/0x440
> [82375.559005]  __sys_sendto+0x234/0x240
> [82375.559555]  __x64_sys_sendto+0x28/0x30
> [82375.560068]  x64_sys_call+0x1909/0x1da0
> [82375.560576]  do_syscall_64+0x7a/0xfa0
> [82375.561076]  ? clear_bhb_loop+0x60/0xb0
> [82375.561567]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
> <snip>
> 
> Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks")
> Signed-off-by: Sreedevi Joshi <sreedevi.joshi@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Reviewed-by: Emil Tantilov <emil.s.tantilov@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Sreedevi Joshi <sreedevi.joshi@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Emil Tantilov <emil.s.tantilov@intel.com>
Subject: Re: [PATCH iwl-net v2 3/3] idpf: Fix RSS LUT NULL ptr issue after soft reset
Date: Thu, 27 Nov 2025 11:45:17 +0000	[thread overview]
Message-ID: <aSg5zR-6ZYXBuIVd@horms.kernel.org> (raw)
In-Reply-To: <20251124184750.3625097-4-sreedevi.joshi@intel.com>

On Mon, Nov 24, 2025 at 12:47:50PM -0600, Sreedevi Joshi wrote:
> During soft reset, the RSS LUT is freed and not restored unless the
> interface is up. If an ethtool command that accesses the rss lut is
> attempted immediately after reset, it will result in NULL ptr
> dereference. Also, there is no need to reset the rss lut if the soft reset
> does not involve queue count change.
> 
> After soft reset, set the RSS LUT to default values based on the updated
> queue count only if the reset was a result of a queue count change and
> the LUT was not configured by the user. In all other cases, don't touch
> the LUT.
> 
> Steps to reproduce:
> 
> ** Bring the interface down (if up)
> ifconfig eth1 down
> 
> ** update the queue count (eg., 27->20)
> ethtool -L eth1 combined 20
> 
> ** display the RSS LUT
> ethtool -x eth1
> 
> [82375.558338] BUG: kernel NULL pointer dereference, address: 0000000000000000
> [82375.558373] #PF: supervisor read access in kernel mode
> [82375.558391] #PF: error_code(0x0000) - not-present page
> [82375.558408] PGD 0 P4D 0
> [82375.558421] Oops: Oops: 0000 [#1] SMP NOPTI
> <snip>
> [82375.558516] RIP: 0010:idpf_get_rxfh+0x108/0x150 [idpf]
> [82375.558786] Call Trace:
> [82375.558793]  <TASK>
> [82375.558804]  rss_prepare.isra.0+0x187/0x2a0
> [82375.558827]  rss_prepare_data+0x3a/0x50
> [82375.558845]  ethnl_default_doit+0x13d/0x3e0
> [82375.558863]  genl_family_rcv_msg_doit+0x11f/0x180
> [82375.558886]  genl_rcv_msg+0x1ad/0x2b0
> [82375.558902]  ? __pfx_ethnl_default_doit+0x10/0x10
> [82375.558920]  ? __pfx_genl_rcv_msg+0x10/0x10
> [82375.558937]  netlink_rcv_skb+0x58/0x100
> [82375.558957]  genl_rcv+0x2c/0x50
> [82375.558971]  netlink_unicast+0x289/0x3e0
> [82375.558988]  netlink_sendmsg+0x215/0x440
> [82375.559005]  __sys_sendto+0x234/0x240
> [82375.559555]  __x64_sys_sendto+0x28/0x30
> [82375.560068]  x64_sys_call+0x1909/0x1da0
> [82375.560576]  do_syscall_64+0x7a/0xfa0
> [82375.561076]  ? clear_bhb_loop+0x60/0xb0
> [82375.561567]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
> <snip>
> 
> Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks")
> Signed-off-by: Sreedevi Joshi <sreedevi.joshi@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Reviewed-by: Emil Tantilov <emil.s.tantilov@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-11-27 11:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 18:47 [Intel-wired-lan] [PATCH iwl-net v2 0/3] idpf: Fix issues in rxhash and rss lut logic Sreedevi Joshi
2025-11-24 18:47 ` Sreedevi Joshi
2025-11-24 18:47 ` [Intel-wired-lan] [PATCH iwl-net v2 1/3] idpf: Fix RSS LUT NULL pointer crash on early ethtool operations Sreedevi Joshi
2025-11-24 18:47   ` Sreedevi Joshi
2025-11-27 11:44   ` [Intel-wired-lan] " Simon Horman
2025-11-27 11:44     ` Simon Horman
2025-12-12 16:42     ` [Intel-wired-lan] " Salin, Samuel
2025-12-12 16:42       ` Salin, Samuel
2025-11-24 18:47 ` [Intel-wired-lan] [PATCH iwl-net v2 2/3] idpf: Fix RSS LUT configuration on down interfaces Sreedevi Joshi
2025-11-24 18:47   ` Sreedevi Joshi
2025-11-27 11:44   ` [Intel-wired-lan] " Simon Horman
2025-11-27 11:44     ` Simon Horman
2025-11-28 23:30     ` [Intel-wired-lan] " Joshi, Sreedevi
2025-11-28 23:30       ` Joshi, Sreedevi
2025-12-12 16:42       ` [Intel-wired-lan] " Salin, Samuel
2025-12-12 16:42         ` Salin, Samuel
2025-11-24 18:47 ` [Intel-wired-lan] [PATCH iwl-net v2 3/3] idpf: Fix RSS LUT NULL ptr issue after soft reset Sreedevi Joshi
2025-11-24 18:47   ` Sreedevi Joshi
2025-11-27 11:45   ` Simon Horman [this message]
2025-11-27 11:45     ` Simon Horman
2025-12-12 16:42     ` [Intel-wired-lan] " Salin, Samuel
2025-12-12 16:42       ` Salin, Samuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aSg5zR-6ZYXBuIVd@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=sreedevi.joshi@intel.com \
    --cc=sridhar.samudrala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.