Re: Scheduling in interrupt BUG. [Patch]

From: Andi Kleen (ak@suse.de)
Date: Mon May 14 2001 - 15:45:08 EST


On Mon, May 14, 2001 at 08:32:33AM -0400, Michal Ostrowski wrote:
> Having looked at the code for locking sockets I am concerned that the
> locking procedures for tcp may be wrong. __release_sock releases the
> socket spinlock before calling sk->backlog_rcv() (== tcp_v4_do_rcv),
> however the comments at the top of tcp_v4_do_rcv() assert that the
> socket's spinlock is held (which is definitely not the case).
>
> Anybody care to comment on this?

Looks ok for me.

The user socket lock (lock.users>0) is held while __release_sock runs,
which is also sufficient to protect it as all new packets will go into backlog.
The spinlock comment only applies to bottom halves.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:37 EST