Skip to contentSkip to conversation

iavf: Fix deadlock in iavf_reset_task

PATCH New Mateusz Palczewski 2 participants 2 messages Feb 23, 2022 – Feb 25, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/8 iavf: Fix deadlock in iavf_reset_task

From: SlawomirX Laba <[email protected]>

There exists a missing mutex_unlock call on crit_lock in iavf_reset_task call path.

Unlock the crit_lock before returning from reset task.

Fixes 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -0
index 36433d6..da50ea3 100644
@@ -2688,6 +2688,7 @@ static void iavf_reset_task(struct work_struct *work)
 			reg_val);
 		iavf_disable_vf(adapter);
 		mutex_unlock(&adapter->client_lock);
+		mutex_unlock(&adapter->crit_lock);
 		return; /* Do not attempt to reinit. It's dead, Jim. */
 	}
 
Signature · 1 line
2.27.0
#1 lore raw

PATCH 6/8 iavf: Fix deadlock in iavf_reset_task

drivers/net/ethernet/intel/iavf/iavf_main.c

Quoted 34 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Mateusz Palczewski
Sent: Wednesday, February 23, 2022 1:39 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Laba, SlawomirX <[email protected]>; Burra, Phani R <[email protected]>; Palczewski, Mateusz <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1 6/8] iavf: Fix deadlock in iavf_reset_task

From: SlawomirX Laba <[email protected]>

There exists a missing mutex_unlock call on crit_lock in iavf_reset_task call path.

Unlock the crit_lock before returning from reset task.

Fixes 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/iavf/iavf_main.c +0 -0
index 36433d6..da50ea3 100644