Yeoreum Yun
6402078bd9
smc91x: fix broken irq-context in PREEMPT_RT
When smc91x.c is built with PREEMPT_RT, the following splat occurs
in FVP_RevC:
[ 13.055000] smc91x LNRO0003:00 eth0: link up, 10Mbps, half-duplex, lpa 0x0000
[ 13.062137] BUG: workqueue leaked atomic, lock or RCU: kworker/2:1[106]
[ 13.062137] preempt=0x00000000 lock=0->0 RCU=0->1 workfn=mld_ifc_work
[ 13.062266] C
** replaying previous printk message **
[ 13.062266] CPU: 2 UID: 0 PID: 106 Comm: kworker/2:1 Not tainted 6.18.0-dirty #179 PREEMPT_{RT,(full)}
[ 13.062353] Hardware name: , BIOS
[ 13.062382] Workqueue: mld mld_ifc_work
[ 13.062469] Call trace:
[ 13.062494] show_stack+0x24/0x40 (C)
[ 13.062602] __dump_stack+0x28/0x48
[ 13.062710] dump_stack_lvl+0x7c/0xb0
[ 13.062818] dump_stack+0x18/0x34
[ 13.062926] process_scheduled_works+0x294/0x450
[ 13.063043] worker_thread+0x260/0x3d8
[ 13.063124] kthread+0x1c4/0x228
[ 13.063235] ret_from_fork+0x10/0x20
This happens because smc_special_trylock() disables IRQs even on PREEMPT_RT,
but smc_special_unlock() does not restore IRQs on PREEMPT_RT.
The reason is that smc_special_unlock() calls spin_unlock_irqrestore(),
and rcu_read_unlock_bh() in __dev_queue_xmit() cannot invoke
rcu_read_unlock() through __local_bh_enable_ip() when current->softirq_disable_cnt becomes zero.
To address this issue, replace smc_special_trylock() with spin_trylock_irqsave().
Fixes: 342a93247e ("locking/spinlock: Provide RT variant header: <linux/spinlock_rt.h>")
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251217085115.1730036-1-yeoreum.yun@arm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-12-23 15:28:34 +01:00
..
2025-12-10 06:38:17 +09:00
2025-12-05 17:29:04 -08:00
2025-12-06 18:34:24 -08:00
2025-12-05 20:41:20 -08:00
2025-11-25 12:39:26 +01:00
2025-12-10 06:29:40 +09:00
2025-12-14 15:24:10 +12:00
2025-12-19 17:23:18 -05:00
2025-12-06 18:34:24 -08:00
2025-11-21 18:42:02 +00:00
2025-12-06 18:34:24 -08:00
2025-12-08 09:38:52 +09:00
2025-12-05 17:29:04 -08:00
2025-12-06 18:34:24 -08:00
2025-12-05 21:29:02 -08:00
2025-12-05 17:29:04 -08:00
2025-12-06 10:15:41 -08:00
2025-12-05 17:47:59 -08:00
2025-12-05 13:52:43 -08:00
2025-11-26 13:58:59 +09:00
2025-11-27 18:11:43 -08:00
2025-12-09 06:35:53 +09:00
2025-12-04 18:42:48 -08:00
2025-11-25 19:20:42 -08:00
2025-12-06 09:01:27 -08:00
2025-12-04 12:26:36 -08:00
2025-12-13 05:44:03 +12:00
2025-11-20 16:44:04 +01:00
2025-11-26 14:28:19 +01:00
2025-12-13 16:36:57 +12:00
2025-12-13 17:39:28 +12:00
2025-11-26 14:40:59 +01:00
2025-12-10 06:38:17 +09:00
2025-12-09 06:10:17 +09:00
2025-12-09 08:46:10 +09:00
2025-12-06 18:34:24 -08:00
2025-12-10 07:48:05 +09:00
2025-12-12 23:59:39 +01:00
2025-12-06 18:34:24 -08:00
2025-12-04 18:54:37 -08:00
2025-12-10 16:44:18 +09:00
2025-11-19 16:03:12 +02:00
2025-12-06 10:15:41 -08:00
2025-12-14 06:07:09 +12:00
2025-12-05 17:29:04 -08:00
2025-12-05 17:29:04 -08:00
2025-11-28 09:47:44 -06:00
2025-12-14 15:35:35 +12:00
2025-12-06 08:27:07 -08:00
2025-12-05 17:29:04 -08:00
2025-12-04 15:18:33 -08:00
2025-12-14 15:35:35 +12:00
2025-12-04 14:10:16 -08:00
2025-12-09 08:50:27 +09:00
2025-11-26 15:09:30 +01:00
2025-12-23 15:28:34 +01:00
2025-12-11 01:40:00 -08:00
2025-12-06 09:32:25 -08:00
2025-12-09 08:53:24 +09:00
2025-12-06 18:34:24 -08:00
2025-12-13 16:26:55 +12:00
2025-12-06 16:24:52 -08:00
2025-12-13 16:29:22 +12:00
2025-12-06 18:34:24 -08:00
2025-12-02 17:03:55 -08:00
2025-11-20 22:38:38 +05:30
2025-12-09 06:45:00 +09:00
2025-12-10 06:38:17 +09:00
2025-12-04 13:50:39 -08:00
2025-11-18 17:35:36 +01:00
2025-12-05 17:29:04 -08:00
2025-12-04 15:50:37 -08:00
2025-12-03 12:42:36 -08:00
2025-12-03 17:24:33 -08:00
2025-12-13 16:41:50 +12:00
2025-12-04 17:10:08 -08:00
2025-12-11 09:54:59 +09:00
2025-11-29 15:20:23 -06:00
2025-11-19 18:34:24 +00:00
2025-12-08 09:38:52 +09:00
2025-11-26 10:16:10 -06:00
2025-12-13 17:09:06 +12:00
2025-12-07 16:15:19 +01:00
2025-12-14 15:35:35 +12:00
2025-12-03 17:24:33 -08:00
2025-12-06 09:01:27 -08:00
2025-12-08 12:37:27 +05:30
2025-12-11 09:57:08 +09:00
2025-12-06 18:52:00 -08:00
2025-12-14 15:35:35 +12:00
2025-11-21 21:27:20 +01:00
2025-12-05 17:29:04 -08:00
2025-12-06 18:42:12 -08:00
2025-12-06 18:38:19 -08:00
2025-12-08 22:11:00 -05:00
2025-11-26 15:10:39 +01:00
2025-12-06 18:42:12 -08:00
2025-12-05 13:52:43 -08:00
2025-12-04 19:42:53 -08:00
2025-12-04 18:59:21 -08:00
2025-12-06 15:41:26 -08:00
2025-12-04 17:34:16 -08:00
2025-11-27 02:03:07 -05:00
2025-12-06 10:00:49 -08:00
2025-12-06 10:49:19 -08:00
2025-12-06 18:52:00 -08:00
2025-12-06 18:52:00 -08:00