Re: [PATCH 5/6] target: Allocate se_luns only when used

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

 



On 03/07/2014 10:22 AM, Christoph Hellwig wrote:
On Fri, Mar 07, 2014 at 10:12:09AM -0800, Andy Grover wrote:
I can't see how the synchronization can work without refcounting the lun
structure.  The lock just protectes the assignment, but you free it
right after.  What happens to how jsut dereferenced it under the lock
but then uses it outside (e.g. core_dev_add_initiator_node_lun_acl).

Well you're right, but this is one instance of a larger lio
locking/refcounting hairball. This will be addressed in a separate
patch series.

I don't think that's true. Before your series we might be accessing a
lun structure that was marked as not active just before, but now the
race becomes a genuine use after free.

OK. I'll work on a follow-on patch that ensures the locks are held long enough.

Thanks -- Andy

--
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