From: Suzanne Wood <suzannew@cs.pdx.edu>
To: herbert@gondor.apana.org.au
Cc: Robert.Olsson@data.slu.se, davem@davemloft.net,
linux-kernel@vger.kernel.org, netdev@oss.sgi.com,
paulmck@us.ibm.com, walpole@cs.pdx.edu
Subject: Re: [RFC][PATCH] identify in_dev_get rcu read-side critical sections
Date: Sat, 1 Oct 2005 11:00:28 -0700 (PDT) [thread overview]
Message-ID: <200510011800.j91I0S3G012676@rastaban.cs.pdx.edu> (raw)
With the spotlight leaving in_dev_get, we have the parallel question
of in_dev_put() and __in_dev_put() both defined with refcnt
decrement, but the preceding underscore may lend itself to an
inadvertant pairing and refcnt inaccuracy.
In the following cscope of linux-2.6.14-rc2 prior to Herbert's patches
which remove the occurence in pktgen.c and the others are
paired with __in_dev_get_rtnl(), except xfrm4_policy.c():
C symbol: __in_dev_put
File Function Line
File Function Line
0 inetdevice.h <global> 172 #define __in_dev_put(idev) atomic_dec(&(idev)->refcnt)
1 pktgen.c pktgen_setup_inject 1687 __in_dev_put(in_dev);
2 devinet.c inet_rtm_deladdr 412 __in_dev_put(in_dev);
3 igmp.c igmp_gq_timer_expire 686 __in_dev_put(in_dev);
4 igmp.c igmp_ifc_timer_expire 698 __in_dev_put(in_dev);
5 igmp.c igmp_heard_query 801 __in_dev_put(in_dev);
6 igmp.c ip_mc_down 1228 __in_dev_put(in_dev);
7 igmp.c ip_mc_down 1231 __in_dev_put(in_dev);
8 igmp.c ip_mc_find_dev 1310 __in_dev_put(idev);
9 xfrm4_policy.c xfrm4_dst_ifdown 280 __in_dev_put(loopback_idev);
It may not be reasonable to rename __in_dev_put for its parallel definition
since its current usage is with __in_dev_get_rtnl() which does not increment
refcnt.
It is also probably good to retain the old __in_dev_get()
and __in_dev_put() and deprecate them.
Old business: this is probably stating the obvious,
with Herbert's patches in place, none of the test patch
I'd submitted 8 Sept should take effect.
Thank you.
Suzanne
----- Original Message -----
From: "Herbert Xu" <herbert@gondor.apana.org.au>
Sent: Saturday, October 01, 2005 12:12 AM
> On Fri, Sep 30, 2005 at 11:56:41PM -0700, Suzanne Wood wrote:
>>
>> The other thing I'd hoped to address in pktgen.c was
>> removing the __in_dev_put() which decrements refcnt
>> while __in_dev_get_rcu() does not increment.
>
> Well spotted.
>
> Here is a patch on top of the last one to fix this bogus decrement.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
next reply other threads:[~2005-10-01 18:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-01 18:00 Suzanne Wood [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-01 18:37 [RFC][PATCH] identify in_dev_get rcu read-side critical sections Suzanne Wood
2005-10-01 19:29 ` Herbert Xu
2005-10-01 6:56 Suzanne Wood
2005-10-01 7:12 ` Herbert Xu
2005-10-01 18:04 ` Paul E. McKenney
2005-09-30 1:06 Suzanne Wood
2005-10-01 1:13 ` Herbert Xu
2005-09-29 23:59 Suzanne Wood
2005-09-30 0:23 ` Herbert Xu
2005-09-29 23:39 Suzanne Wood
2005-09-29 23:30 Suzanne Wood
2005-09-30 0:21 ` Herbert Xu
2005-09-30 0:23 ` Paul E. McKenney
2005-09-30 0:27 ` Herbert Xu
2005-09-30 0:36 ` Paul E. McKenney
2005-09-30 1:04 ` Herbert Xu
2005-09-30 1:16 ` Paul E. McKenney
2005-09-30 1:19 ` Herbert Xu
2005-09-29 16:02 Suzanne Wood
2005-09-29 21:28 ` Herbert Xu
2005-09-28 0:22 Suzanne Wood
2005-09-08 17:12 Suzanne Wood
2005-09-27 20:56 ` David S. Miller
2005-09-28 2:55 ` Herbert Xu
2005-09-28 14:51 ` Paul E. McKenney
2005-09-28 22:11 ` Herbert Xu
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=200510011800.j91I0S3G012676@rastaban.cs.pdx.edu \
--to=suzannew@cs.pdx.edu \
--cc=Robert.Olsson@data.slu.se \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=paulmck@us.ibm.com \
--cc=walpole@cs.pdx.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).