From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Pavel Emelyanov <xemul@openvz.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Linux Netdev List <netdev@vger.kernel.org>,
devel@openvz.org
Subject: Re: [PATCH] Fix inet_diag.ko register vs rcv race
Date: Thu, 29 Nov 2007 10:47:17 -0200 [thread overview]
Message-ID: <20071129124717.GD12069@ghostprotocols.net> (raw)
In-Reply-To: <20071129123733.GC30420@gondor.apana.org.au>
Em Thu, Nov 29, 2007 at 11:37:34PM +1100, Herbert Xu escreveu:
> On Tue, Nov 27, 2007 at 04:09:43PM +0300, Pavel Emelyanov wrote:
> > The following race is possible when one cpu unregisters the handler
> > while other one is trying to receive a message and call this one:
>
> Good catch! But I think we need a bit more to close this fully.
>
> Dumps can resume asynchronously which means that they won't be
> holding inet_diag_mutex. We can fix that pretty easily by
> giving that as our cb_mutex.
>
> So could you add that to your patch and resubmit?
>
> Arnaldo, synchronize_rcu() doesn't work on its own. Whoever accesses
> the object that it's supposed to protect has to use the correct RCU
> primitives for this to work.
>
> Synchronisation is like tango, it always takes two to make it work :)
Agreed, I didn't checked that when refactoring inet_diag, leaving this
as it was before I put my hands on it :-)
- Arnaldo
prev parent reply other threads:[~2007-11-29 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 13:09 [PATCH] Fix inet_diag.ko register vs rcv race Pavel Emelyanov
2007-11-29 12:37 ` Herbert Xu
2007-11-29 12:47 ` Arnaldo Carvalho de Melo [this message]
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=20071129124717.GD12069@ghostprotocols.net \
--to=acme@redhat.com \
--cc=devel@openvz.org \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.org \
/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).