Chengfeng Ye
1774250a20
mISDN: hfcpci: Fix potential deadlock on &hc->lock
...
[ Upstream commit 56c6be35fcbed54279df0a2c9e60480a61841d6f ]
As &hc->lock is acquired by both timer _hfcpci_softirq() and hardirq
hfcpci_int(), the timer should disable irq before lock acquisition
otherwise deadlock could happen if the timmer is preemtped by the hadr irq.
Possible deadlock scenario:
hfcpci_softirq() (timer)
-> _hfcpci_softirq()
-> spin_lock(&hc->lock);
<irq interruption>
-> hfcpci_int()
-> spin_lock(&hc->lock); (deadlock here)
This flaw was found by an experimental static analysis tool I am developing
for irq-related deadlock.
The tentative patch fixes the potential deadlock by spin_lock_irq()
in timer.
Fixes: b36b654a7e ("mISDN: Create /sys/class/mISDN")
Signed-off-by: Chengfeng Ye <dg573847474@gmail.com >
Link: https://lore.kernel.org/r/20230727085619.7419-1-dg573847474@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-08-11 11:53:55 +02:00
..
2023-08-11 11:53:53 +02:00
2023-06-05 08:17:33 +02:00
2023-08-11 11:53:49 +02:00
2023-06-09 10:29:01 +02:00
2023-08-08 19:56:35 +02:00
2023-08-11 11:53:54 +02:00
2023-05-17 11:35:45 +02:00
2023-04-05 11:16:42 +02:00
2023-08-11 11:53:52 +02:00
2023-07-27 08:37:15 +02:00
2023-07-27 08:37:05 +02:00
2023-05-17 11:35:31 +02:00
2023-08-11 11:53:53 +02:00
2023-01-18 11:40:53 +01:00
2023-07-27 08:37:18 +02:00
2023-01-18 11:41:52 +01:00
2023-01-18 11:41:21 +01:00
2023-06-09 10:28:52 +02:00
2022-09-05 10:27:45 +02:00
2023-05-17 11:35:35 +02:00
2023-07-27 08:37:20 +02:00
2023-06-09 10:29:01 +02:00
2023-07-27 08:37:37 +02:00
2023-05-17 11:35:46 +02:00
2023-02-22 12:50:23 +01:00
2023-08-11 11:53:44 +02:00
2023-08-11 11:53:49 +02:00
2023-07-27 08:37:03 +02:00
2023-01-18 11:41:28 +01:00
2023-06-28 10:18:36 +02:00
2023-08-11 11:53:52 +02:00
2023-05-30 12:44:10 +01:00
2023-07-27 08:37:24 +02:00
2023-06-09 10:29:01 +02:00
2022-10-07 09:16:55 +02:00
2023-07-27 08:37:38 +02:00
2023-08-11 11:53:48 +02:00
2023-07-27 08:37:13 +02:00
2023-03-22 13:28:08 +01:00
2023-06-09 10:28:52 +02:00
2023-08-11 11:53:52 +02:00
2023-08-11 11:53:55 +02:00
2023-05-17 11:35:53 +02:00
2023-05-17 11:35:50 +02:00
2023-07-27 08:37:23 +02:00
2023-05-30 12:44:04 +01:00
2023-08-11 11:53:53 +02:00
2023-07-27 08:37:20 +02:00
2023-07-27 08:37:14 +02:00
2023-07-27 08:37:10 +02:00
2023-05-30 12:44:03 +01:00
2023-07-27 08:37:22 +02:00
2023-07-27 08:37:37 +02:00
2023-07-27 08:37:25 +02:00
2023-07-27 08:37:34 +02:00
2023-08-11 11:53:55 +02:00
2023-06-28 10:18:41 +02:00
2023-07-27 08:37:32 +02:00
2022-07-07 17:36:48 +02:00
2023-05-17 11:35:43 +02:00
2023-02-22 12:50:28 +01:00
2023-05-17 11:35:47 +02:00
2023-03-11 16:43:41 +01:00
2023-01-18 11:41:50 +01:00
2022-11-25 17:42:14 +01:00
2023-08-11 11:53:45 +02:00
2022-06-14 18:11:50 +02:00
2023-01-18 11:40:50 +01:00
2023-08-11 11:53:47 +02:00
2023-07-27 08:37:43 +02:00
2023-08-11 11:53:48 +02:00
2023-01-18 11:40:54 +01:00
2023-06-21 15:44:09 +02:00
2023-07-27 08:37:06 +02:00
2023-04-05 11:16:43 +02:00
2023-08-11 11:53:46 +02:00
2023-01-18 11:40:59 +01:00
2023-07-27 08:37:07 +02:00
2023-05-17 11:36:01 +02:00
2023-03-11 16:43:53 +01:00
2023-07-27 08:37:22 +02:00
2023-08-11 11:53:53 +02:00
2023-08-11 11:53:46 +02:00
2022-11-25 17:42:14 +01:00
2022-11-25 17:42:17 +01:00
2023-07-27 08:37:14 +02:00
2022-08-25 11:17:54 +02:00
2023-07-27 08:37:43 +02:00
2023-05-17 11:35:49 +02:00
2023-06-09 10:29:01 +02:00
2023-08-11 11:53:52 +02:00
2023-06-28 10:18:40 +02:00
2022-12-08 11:22:57 +01:00
2023-03-11 16:44:13 +01:00
2023-04-05 11:16:39 +02:00
2023-08-11 11:53:50 +02:00
2023-01-18 11:41:22 +01:00
2023-08-11 11:53:51 +02:00
2023-01-18 11:41:22 +01:00
2023-06-09 10:29:01 +02:00
2023-07-27 08:37:44 +02:00
2022-08-25 11:18:33 +02:00
2023-06-09 10:29:01 +02:00
2023-01-18 11:41:26 +01:00
2023-07-27 08:37:19 +02:00
2023-06-09 10:28:55 +02:00
2023-05-30 12:44:10 +01:00