From: James Bottomley Date: Tue, 5 Sep 2006 21:26:41 +0000 (-0500) Subject: [SCSI] Fix refcount breakage with 'echo "1" > scan' when target already present X-Git-Tag: v2.6.19-rc1~1266^2~19^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=884d25cc4fda20908fd4ef93dbb41d817984b68b;p=pandora-kernel.git [SCSI] Fix refcount breakage with 'echo "1" > scan' when target already present Spotted by: Dan Aloni The problem is there's inconsistent locking semantic usage of scsi_alloc_target(). Two callers assume the target comes back with reference unincremented and the third assumes its incremented. Fix by always making the reference incremented on return. Also fix path in target alloc that could consistently increment the parent lock. Finally document scsi_alloc_target() so its callers know what the expectations are. Signed-off-by: James Bottomley --- Reading git-diff-tree failed