Thread (15 messages) 15 messages, 4 authors, 2005-05-03

Re: KERNEL: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (126)

From: "David S. Miller" <davem@davemloft.net>
Date: 2005-03-31 01:02:36

On Wed, 30 Mar 2005 18:26:40 +1000
Herbert Xu [off-list ref] wrote:
In netlink_dump we're operating on sk after dropping the cb lock.
This is racy because the owner of the socket could close it after
we drop the cb lock.

This is possible because netlink_dump isn't always called from the
context of the process that owns the socket.  For instance, if there
is contention on rtnl then rtnetlink requests will be processed by
the process that owns the rtnl.

The solution is to hold a ref count on the socket before we drop
the cb lock.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied, thanks Herbert.

Looks like 2.4.x needs the same fix, correct?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help