netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yao zhao <dragonlinux@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org,
	Stephen Hemminger <shemminger@vyatta.com>,
	Wensong Zhang <wensong@linux-vs.org>,
	Julian Anastasov <ja@ssi.bg>,
	Paul E McKenney <paulmck@linux.vnet.ibm.com>
Subject: Re: [rfc] IPVS: convert scheduler management to RCU
Date: Fri, 20 Aug 2010 13:54:11 -0400	[thread overview]
Message-ID: <AANLkTin8SXBtnKsaWdb64h2UVCZ57zHFOoZUWbbz_7HM@mail.gmail.com> (raw)
In-Reply-To: <1282318337.2484.219.camel@edumazet-laptop>

On Fri, Aug 20, 2010 at 11:32 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le vendredi 20 août 2010 à 11:04 -0400, yao zhao a écrit :
>
>> The code here is deleting a global from the list, am I right? I didn't
>> see any called case.
>> what are you going to do more? free it? write_unlock_bh should make the mb.
>
>
> If you dont wait _after_ delete from list and following actions
> (kfree() without a call_rcu(), or module unload, or whatever), a reader
> might access your data/code and crash the box.
>
> spin_unlock_bh() wont help you at all, since only writers are freezed by
> the lock (since readers only hold rcu_lock)
>
> Documentation/RCU/whatisRCU.txt line 705
>
> Documentation/RCU/checklist.txt  15)
>
>
>
>
I read the code again and that global is in a module then you are right.
If that global is not in a module then you don't need it at all, as in
that global only functions pointer or name... which never be changed.

yao

  reply	other threads:[~2010-08-20 17:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 13:33 [rfc] IPVS: convert scheduler management to RCU Simon Horman
2010-08-20 13:44 ` Changli Gao
2010-08-20 14:00   ` Simon Horman
2010-08-20 14:05   ` Eric Dumazet
2010-08-20 14:16     ` yao zhao
2010-08-20 14:32       ` Eric Dumazet
2010-08-20 15:04         ` yao zhao
2010-08-20 15:32           ` Eric Dumazet
2010-08-20 17:54             ` yao zhao [this message]
2010-08-20 14:33       ` Simon Horman
2010-08-20 14:31     ` Simon Horman
2010-08-20 13:59 ` Simon Horman
2010-08-20 19:29   ` Paul E. McKenney
2010-08-21  3:28     ` Simon Horman
2010-08-20 18:03 ` Julian Anastasov
2010-08-21  3:30   ` Simon Horman

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=AANLkTin8SXBtnKsaWdb64h2UVCZ57zHFOoZUWbbz_7HM@mail.gmail.com \
    --to=dragonlinux@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=shemminger@vyatta.com \
    --cc=wensong@linux-vs.org \
    --cc=xiaosuo@gmail.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 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).