Re: [PATCH net v2] usbnet: fix smp_processor_id() use in preemptible context
From: Oliver Neukum
Date: Mon Sep 07 2026 - 07:57:57 EST
On 06.09.26 00:45, Ömer Mete Kaya wrote:
usbnet_skb_return() and tx_complete() call this_cpu_ptr() before
disabling IRQs, which triggers a BUG when running with PREEMPT_FULL:
BUG: using smp_processor_id() in preemptible code in tx_complete
Fix by saving IRQs first with local_irq_save(), then calling
this_cpu_ptr() and using the non-irqsave variants of u64_stats
update helpers, since IRQs are already disabled at that point.
Hi,
thank you for the patch. However, if the problem is preemption,
when not simply preempt_disable()/peempt_enable()?
Why is it necessary to switch off interrupts?
Regards
Oliver