netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iwl-net v2 0/5] idpf: fix issues in the reset handling path
@ 2025-11-21  0:12 Emil Tantilov
  2025-11-21  0:12 ` [PATCH iwl-net v2 1/5] idpf: keep the netdev when a reset fails Emil Tantilov
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Emil Tantilov @ 2025-11-21  0:12 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, Aleksandr.Loktionov, przemyslaw.kitszel, anthony.l.nguyen,
	andrew+netdev, davem, edumazet, kuba, pabeni, decot, willemb,
	joshua.a.hay, madhu.chittim, aleksander.lobakin, larysa.zaremba,
	iamvivekkumar

Resolve multiple issues in the error path during reset handling of the
IDPF driver:
- Mailbox timeouts in the init task during a reset lead to the netdevs
  being unregistered.
- Reset times out and leaves the netdevs exposed to callbacks with the
  vport resources already freed.
- Simultaneous reset and soft reset calls will result in the loss of the
  vport state, leaving the netdev in DOWN state.
- Memory leak in idpf_vport_rel() where vport->rx_ptype_lkup was not
  freed during a reset.
- Memory leak in idpf_vc_core_deinit(), where kfree() was missing for
  hw->lan_regs.
- Crash on reset following a failed init on load, due to the service
  tasks still running in the background and attempting to handle the
  reset while resources are not initialized.

Changelog:
v2:
 - Patch 1 - No change.
 - Patch 2 - Changed the check for vport being NULL by accessing it via the
   adapter struct instead of idpf_netdev_priv. This avoids potential NULL
   pointer in the case where the init task failed on driver load.
   Updated comments to clarify vports can be NULL before the call to
   idpf_attach_and_open().
 - Patch 3 - No change.
 - Patch 4 - No change.
 - Patch 5 - New to the series, to fix a crash, following a failed driver
   load due to an error in the init task.

v1: https://lore.kernel.org/intel-wired-lan/20251110180823.18008-1-emil.s.tantilov@intel.com/

Emil Tantilov (5):
  idpf: keep the netdev when a reset fails
  idpf: detach and close netdevs while handling a reset
  idpf: fix memory leak in idpf_vport_rel()
  idpf: fix memory leak in idpf_vc_core_deinit()
  idpf: fix error handling in the init_task on load

 drivers/net/ethernet/intel/idpf/idpf_lib.c    | 156 +++++++++++-------
 .../net/ethernet/intel/idpf/idpf_virtchnl.c   |   4 +
 2 files changed, 96 insertions(+), 64 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-12-10 22:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  0:12 [PATCH iwl-net v2 0/5] idpf: fix issues in the reset handling path Emil Tantilov
2025-11-21  0:12 ` [PATCH iwl-net v2 1/5] idpf: keep the netdev when a reset fails Emil Tantilov
2025-12-10 22:28   ` [Intel-wired-lan] " Salin, Samuel
2025-11-21  0:12 ` [PATCH iwl-net v2 2/5] idpf: detach and close netdevs while handling a reset Emil Tantilov
2025-11-25 13:42   ` Simon Horman
2025-11-25 14:58     ` Tantilov, Emil S
2025-11-26 17:10       ` Simon Horman
2025-12-10 22:28         ` [Intel-wired-lan] " Salin, Samuel
2025-12-01 21:34   ` Chittim, Madhu
2025-11-21  0:12 ` [PATCH iwl-net v2 3/5] idpf: fix memory leak in idpf_vport_rel() Emil Tantilov
2025-12-10 22:28   ` [Intel-wired-lan] " Salin, Samuel
2025-11-21  0:12 ` [PATCH iwl-net v2 4/5] idpf: fix memory leak in idpf_vc_core_deinit() Emil Tantilov
2025-12-10 22:28   ` [Intel-wired-lan] " Salin, Samuel
2025-11-21  0:12 ` [PATCH iwl-net v2 5/5] idpf: fix error handling in the init_task on load Emil Tantilov
2025-12-01 21:44   ` Chittim, Madhu
2025-12-10 22:29     ` [Intel-wired-lan] " Salin, Samuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).