| To: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [NETLINK] cb_lock does not needs ref count on sk |
| From: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
| Date: | Tue, 3 May 2005 14:42:44 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20050401093633.GA32707@gondor.apana.org.au> |
| References: | <20050327091524.GA23215@elte.hu> <E1DFUaZ-0001Hg-00@gondolin.me.apana.org.au> <20050327133811.GA5569@elte.hu> <20050329104906.GA19836@gondor.apana.org.au> <20050329114926.GA14986@elte.hu> <20050330082640.GA8269@gondor.apana.org.au> <20050330170236.2bddf666.davem@davemloft.net> <20050331231922.GA26587@gondor.apana.org.au> <20050331232322.GA26693@gondor.apana.org.au> <20050331203313.57e1c5c3.davem@davemloft.net> <20050401093633.GA32707@gondor.apana.org.au> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Fri, 1 Apr 2005 19:36:33 +1000 Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx> Looks good, applied. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2.4 6/6][SCTP] Fix SCTP sendbuffer accouting., David S. Miller |
|---|---|
| Next by Date: | Re: Mystery packet killing tg3, David S. Miller |
| Previous by Thread: | Re: [PATCH 2.4 6/6][SCTP] Fix SCTP sendbuffer accouting., David S. Miller |
| Next by Thread: | [PATCH] (1/3) netetm: trap infinite loop hange on qlen underflow, Stephen Hemminger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |