[PATCH] SCSI core: Fix refcounting error
This bug was present as of 2.6.9-bk7, apparently introduced along with the addition of SCSI targets into sysfs. The code takes a reference to the host for each initialized sdev but only drops a reference when each target is released. As you might expect, this causes a refcount leak whenever a target has more than 0 LUNs. The patch changes things so that the reference is acquired when the target is initialized, not when the sdev is initialized. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Showing
Please register or sign in to comment