Re: IrDA woes..
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2014-01-02 21:07:07
On Thu, Jan 2, 2014 at 11:11 AM, Linus Torvalds [off-list ref] wrote:
I get the feeling that the code was written back in the bad old days when we had the big kernel lock, and timers and network bottom half handling were all mutually exclusive.
Hmm. It even has a comment to that effect, see
irlap_resend_rejected_frames(), which does that skb_queue_walk()
without taking the queue lock. It says:
* Resend frames which has not been acknowledged. Should be safe to
* traverse the list without locking it since this function will only be
* called from interrupt context (BH)
and I don't *think* that is true any more.
Now, because it is in bottom half contect, I think it won't be
re-entered on the same CPU, but another cpu might be busy doing
irda_rcv(). No?
So I'd be inclined to take the queue lock (self->wx_list.lock) around
that skb_queue_walk(). Or am I just dazed and confused?
Linus