On Thu, Mar 16, 2006 at 01:45:20AM -0800, David S. Miller ([EMAIL PROTECTED]) 
wrote:
> From: Evgeniy Polyakov <[EMAIL PROTECTED]>
> Date: Thu, 16 Mar 2006 12:42:40 +0300
> 
> > Why process should be there?  It can request for data and sleep
> > away.  ucopy is never used for async sockets - all needed for
> > transfer data is stored inside kevents.
> 
> The point is that if tp->ucopy.task is non-NULL then process
> is there.  You added the sock_async() test to such a code
> path.
> 
> tcp_recvmsg() only sets that pointer when task is active
> in tcp_recvmsg().  If task sleeps, socket remains locked
> such that any TCP packet received will be added to prequeue.
> When task wakes up, it runs backlog with tp->ucopy.task
> still set.
> 
> So it makes no sense to guard prequeue processing with
> sock_async() check when tp->ucopy.task != NULL tells the
> exact state.

Actually I added sock_async() checks to detect cases, when ucopy is set
somewhere, but socket was marked as async later, so I just use
sock_async() where other cheks could be done.

-- 
        Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to