All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: mingo@elte.hu, netdev@oss.sgi.com, linux-net@vger.kernel.org,
	olel@ans.pl
Subject: Re: KERNEL: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (126)
Date: Wed, 30 Mar 2005 17:02:36 -0800	[thread overview]
Message-ID: <20050330170236.2bddf666.davem@davemloft.net> (raw)
In-Reply-To: <20050330082640.GA8269@gondor.apana.org.au>

On Wed, 30 Mar 2005 18:26:40 +1000
Herbert Xu <herbert@gondor.apana.org.au> 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?

  reply	other threads:[~2005-03-31  1:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-27  9:15 KERNEL: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (126) Ingo Molnar
2005-03-27 10:01 ` Herbert Xu
2005-03-27 13:38   ` Ingo Molnar
2005-03-29 10:49     ` Herbert Xu
2005-03-29 11:49       ` Ingo Molnar
2005-03-30  8:26         ` Herbert Xu
2005-03-31  1:02           ` David S. Miller [this message]
2005-03-31  1:10             ` Herbert Xu
2005-03-31 19:19               ` David S. Miller
2005-03-31 23:19             ` Herbert Xu
2005-03-31 23:23               ` Herbert Xu
2005-04-01  4:33                 ` David S. Miller
2005-04-01  9:36                   ` [NETLINK] cb_lock does not needs ref count on sk Herbert Xu
2005-05-03 21:42                     ` David S. Miller
2005-03-31 20:00           ` KERNEL: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (126) Krzysztof Oledzki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050330170236.2bddf666.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-net@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@oss.sgi.com \
    --cc=olel@ans.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.