Thread (16 messages) 16 messages, 5 authors, 2014-01-04

Re: IrDA woes..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2014-01-02 22:47:45

On Thu, Jan 2, 2014 at 2:41 PM, David Miller [off-list ref] wrote:
Yes, something like the following untested patch.
I did that initially too, but that doesn't work, because the code
inside the skb_queue_walk() loop ends up calling irlap_send_i_frame()
which calls irlap_queue_xmit(), which does dev_queue_xmit().

Which will do a bh_disable/bh_enable() (as part of spin_[un]lock_bh(), iirc).

So you can't use "spin_lock_irqsave()", because it doesn't nest around
a softirq-disable.

You could use spin_lock_bh(), but if it's true that it's all in a
softirq context, I think it should be safe to just do "spin_lock()".
Afaik, there is nothing that actually does anything in real hardirq
context in there. I *think* all the network _rcv() functions are
called from softirqs, right?

             Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help