Re: [PATCH] block: remove parent device reference from struct bsg_class_device

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

 



On 5/29/18 12:40 AM, Christoph Hellwig wrote:
> Bsg holding a reference to the parent device may result in a crash if a
> bsg file handle is closed after the parent device driver has unloaded.
> 
> Holding a reference is not really needed: the parent device must exist
> between bsg_register_queue and bsg_unregister_queue.  Before the device
> goes away the caller does blk_cleanup_queue so that all in-flight
> requests to the device are gone and all new requests cannot pass beyond
> the queue.  The queue itself is a refcounted object and it will stay
> alive with a bsg file.
> 
> Based on analysis, previous patch and changelog from Anatoliy Glagolev.

Applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux