Re: [PATCH] correct attribute_container list usage

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

 



On Mon, 2005-08-22 at 15:14 -0700, Patrick Mansfield wrote:
> based on whatever was in current 2.6.x git tree a couple weeks ago.]
> 
> The klist is (effectively) embedded within the struct device.
> 
> The klist_next() gets and puts on the klist object, so when the struct
> device ref (or kref) counts go to zero, we free up the klist independent
> of its ref counts.

Aarg, yet another object lifetime problem.

That somewhat lessens klist's utility, I think.  To fix this, the node
kref and the object that embeds it have to be tied together somehow.

One apparent, but rather nasty, solution would be to embed object get
and put into the klist head as functions that take the node, so
klist_next would take the object reference as well as the list kref,
then drop it on klist_release.

James


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