Re: Warning in net/ipv4/af_inet.c:154

David Miller
2010-05-27T04:20:57Z

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 27 May 2010 06:18:46 +0200

> Process context :
>
> lock only (sk_lock.slock = locked, sk_lock.owned = ???)
>
> So I should add a test on owned. If set (by another thread), we should take the slow path.

Indeed, what you're doing now is broken.

If owned is non-zero when you take the spinlock you have to queue your
work, just like how we toss packets into the socket backlog, which is
processed by release_sock(), when this happens.