Files
linux/drivers/net
Moshe Shemesh 5fdd520306 net/mlx5: Fix health work queue spin lock to IRQ safe
[ Upstream commit 6377ed0bba ]

spin_lock/unlock of health->wq_lock should be IRQ safe.
It was changed to spin_lock_irqsave since adding commit 0179720d6b
("net/mlx5: Introduce trigger_health_work function") which uses
spin_lock from asynchronous event (IRQ) context.
Thus, all spin_lock/unlock of health->wq_lock should have been moved
to IRQ safe mode.
However, one occurrence on new code using this lock missed that
change, resulting in possible deadlock:
  kernel: Possible unsafe locking scenario:
  kernel:       CPU0
  kernel:       ----
  kernel:  lock(&(&health->wq_lock)->rlock);
  kernel:  <Interrupt>
  kernel:    lock(&(&health->wq_lock)->rlock);
  kernel: #012 *** DEADLOCK ***

Fixes: 2a0165a034 ("net/mlx5: Cancel delayed recovery work when unloading the driver")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 09:12:54 +09:00
..
2023-05-15 09:01:44 +09:00
2016-06-15 22:06:06 -07:00
2018-04-30 06:05:25 -07:00
2023-05-15 09:11:57 +09:00
2017-12-09 22:01:54 +01:00
2016-05-09 00:00:28 -04:00
2016-04-26 15:53:05 -04:00
2018-01-31 14:13:00 +01:00
2018-03-22 09:17:57 +01:00