Re: [PATCH 3/8] aacraid: handle AIF hotplug events

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

 



James Bottomley wrote:
scsi_add_device() returns an sdev on
success with the refcount bumped up for you.  If you don't do a put,
you'll be stuck with a device you can't get rid of.

However, all other users of scsi_add_device() make the same mistake ...

Sbp2 was fixed recently, thanks to your advice. (Although the fix did not make it into Linus' tree yet.)

I'll apply this patch and fix the API to return zero or error and not
bump the sdev refcount.

If you will do this, the now correct scsi_device_put() will become not only incorrect but even dangerous, won't it?
--
Stefan Richter
-=====-=-=-= =--= -=-=-
http://arcgraph.de/sr/
-
: 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