From: "David S. Miller" <davem@davemloft.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@oss.sgi.com
Subject: Re: [NETLINK] cb_lock does not needs ref count on sk
Date: Tue, 3 May 2005 14:42:44 -0700 [thread overview]
Message-ID: <20050503144244.1efdfd0c.davem@davemloft.net> (raw)
In-Reply-To: <20050401093633.GA32707@gondor.apana.org.au>
On Fri, 1 Apr 2005 19:36:33 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Here is a little optimisation for the cb_lock used by netlink_dump.
> While fixing that race earlier, I noticed that the reference count
> held by cb_lock is completely useless. The reason is that in order
> to obtain the protection of the reference count, you have to take
> the cb_lock. But the only way to take the cb_lock is through
> dereferencing the socket.
>
> That is, you must already possess a reference count on the socket
> before you can take advantage of the reference count held by cb_lock.
> As a corollary, we can remve the reference count held by the cb_lock.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Looks good, applied.
next prev parent reply other threads:[~2005-05-03 21:42 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
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 [this message]
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=20050503144244.1efdfd0c.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.com \
/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.