Thread (10 messages) 10 messages, 4 authors, 28d ago

Re: [PATCH net v2] usbnet: fix smp_processor_id() use in preemptible context

flat view

From: Oliver Neukum <oneukum@suse.com>
Date: 2026-09-07 11:38:56
Also in: lkml, netdev


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help