aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2006-09-05 17:26:41 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-07 11:08:43 -0400
commit884d25cc4fda20908fd4ef93dbb41d817984b68b (patch)
tree99a7a2a02ff76bee9c4a0620e6a90321517bba13 /drivers/scsi/scsi.c
parent26dacd0c9b2dc1dc987c376aeee4e80691a7dd0b (diff)
[SCSI] Fix refcount breakage with 'echo "1" > scan' when target already present
Spotted by: Dan Aloni <da-xx@monatomic.org> 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 <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi.c')
0 files changed, 0 insertions, 0 deletions