From: Herbert Xu <herbert@gondor.apana.org.au>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: 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 23:37:34 +1100 [thread overview]
Message-ID: <20071129123733.GC30420@gondor.apana.org.au> (raw)
In-Reply-To: <474C1717.4040607@openvz.org>
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 :)
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2007-11-29 12:37 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 [this message]
2007-11-29 12:47 ` Arnaldo Carvalho de Melo
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=20071129123733.GC30420@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=acme@redhat.com \
--cc=devel@openvz.org \
--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).