Re: [PATCH 0/2] sg: fix races during device removal (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg KH wrote:
> On Wed, Jan 14, 2009 at 03:31:15PM -0500, Tony Battersby wrote:
>> 4) Add a variation of kref_get() that uses atomic_inc_not_zero().
> 
> Ick.

I missed the most part of this thread.  But in the grandparent post,
Tony wrote:

>> Fujita, your patch results in simpler code than my version 2 patch,
>> but it still leaves some subtle races and other problems.  The crux
>> of the problem is that kref_put() needs do be done while holding a
>> lock if there is still a way for some other CPU to find a reference
>> to the object in between the time the refcount drops to 0 and the
>> time the destructor is called.

This sounds bogus to me.  If "some other CPU can find a reference to the
object" after the reference count dropped to zero, then the problem is
IMO clear and simple:

Some site did not increase the refcount when it should.
-- 
Stefan Richter
-=====-==--= ---= -===-
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux