OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Fix inet_diag.ko register vs rcv race
Re: [PATCH] Fix inet_diag.ko register vs rcv race [message #23970 is a reply to message #23968] Thu, 29 November 2007 12:47 Go to previous message
Arnaldo Carvalho de M is currently offline  Arnaldo Carvalho de M
Messages: 27
Registered: October 2007
Junior Member
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
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
Next Topic: [PATCH] Nicer WARN_ON in netstat_show
Goto Forum:
  


Current Time: Sun Jan 11 10:39:25 GMT 2026

Total time taken to generate the page: 0.61687 seconds