Re: [PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modified)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Wednesday, May 26, 2010 - 2:48 pm

On Wed, May 26, 2010 at 09:25:31PM +0000, Haiyang Zhang wrote:

Ok, but then you should use a lock to protect the variable, not an atomic_t.


If you care about this, because some other thread is looking at it, then
you really need to protect it with a lock.  Don't rely on a mb() to get
it all correct for you (hint, I doubt it will...)


Looks like a bug in checkpatch.pl, go poke Andy about that please.


Yes, I know what it stands for, but the rest of the world doesn't :)


But again, this logic should be within the init call, as it's part of
the proper init sequence.  So just put it in that call please.

thanks,

greg k-h
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/1] staging: hv: Fix race condition on IC chan ..., Greg KH, (Wed May 26, 2:48 pm)