linux-stable/block
Christoph Hellwig 5de815a7ee block: remove parent device reference from struct bsg_class_device
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.

Reported-by: Anatoliy Glagolev <glagolig@gmail.com>
Reviewed-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-05-29 13:00:25 -06:00
..
partitions
badblocks.c
bfq-cgroup.c block: use ktime_get_ns() instead of sched_clock() for cfq and bfq 2018-05-09 08:33:06 -06:00
bfq-iosched.c bfq-iosched: update shallow depth to smallest one used 2018-05-10 11:27:41 -06:00
bfq-iosched.h bfq-iosched: remove unused variable 2018-05-10 11:27:31 -06:00
bfq-wf2q.c
bio-integrity.c block: Convert bio_set to mempool_init() 2018-05-14 13:16:03 -06:00
bio.c block: Export bio check/set pages_dirty 2018-05-14 13:16:15 -06:00
blk-cgroup.c blkcg: init root blkcg_gq under lock 2018-04-19 08:51:59 -06:00
blk-core.c blk-mq: Remove generation seqeunce 2018-05-29 08:59:21 -06:00
blk-exec.c
blk-flush.c
blk-integrity.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
blk-ioc.c
blk-lib.c block: break discard submissions into the user defined size 2018-05-08 15:10:44 -06:00
blk-map.c
blk-merge.c block: consolidate struct request timestamp fields 2018-05-09 08:33:09 -06:00
blk-mq-cpumap.c blk-mq: don't keep offline CPUs mapped to hctx 0 2018-04-10 08:38:46 -06:00
blk-mq-debugfs.c blk-mq: Remove generation seqeunce 2018-05-29 08:59:21 -06:00
blk-mq-debugfs.h
blk-mq-pci.c blk-mq: Allow PCI vector offset for mapping queues 2018-03-27 21:25:36 -06:00
blk-mq-rdma.c
blk-mq-sched.c blk-mq-sched: Enable merging discard bio into request 2018-02-01 14:45:11 -07:00
blk-mq-sched.h
blk-mq-sysfs.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
blk-mq-tag.c blk-mq: avoid starving tag allocation after allocating process migrates 2018-05-24 11:00:39 -06:00
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: simplify blk_mq_rq_timed_out 2018-05-29 08:59:21 -06:00
blk-mq.h blk-mq: Remove generation seqeunce 2018-05-29 08:59:21 -06:00
blk-settings.c block: Introduce blk_queue_flag_{set,clear,test_and_{set,clear}}() 2018-03-08 14:13:48 -07:00
blk-softirq.c
blk-stat.c block: consolidate struct request timestamp fields 2018-05-09 08:33:09 -06:00
blk-stat.h block: consolidate struct request timestamp fields 2018-05-09 08:33:09 -06:00
blk-sysfs.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
blk-tag.c
blk-throttle.c block: get rid of struct blk_issue_stat 2018-05-09 08:33:05 -06:00
blk-timeout.c block: remove BLK_EH_HANDLED 2018-05-29 08:59:21 -06:00
blk-wbt.c block: get rid of struct blk_issue_stat 2018-05-09 08:33:05 -06:00
blk-wbt.h block: get rid of struct blk_issue_stat 2018-05-09 08:33:05 -06:00
blk-zoned.c blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers 2018-05-22 11:58:07 -06:00
blk.h block: consolidate struct request timestamp fields 2018-05-09 08:33:09 -06:00
bounce.c block: don't disable interrupts during kmap_atomic() 2018-05-07 15:26:36 -06:00
bsg-lib.c block: remove parent device reference from struct bsg_class_device 2018-05-29 13:00:25 -06:00
bsg.c block: remove parent device reference from struct bsg_class_device 2018-05-29 13:00:25 -06:00
cfq-iosched.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
elevator.c
genhd.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
ioctl.c block: pass inclusive 'lend' parameter to truncate_inode_pages_range 2018-02-23 15:20:19 -07:00
ioprio.c
Kconfig
Kconfig.iosched
kyber-iosched.c kyber-iosched: update shallow depth when setting up hardware queue 2018-05-10 11:27:46 -06:00
Makefile
mq-deadline.c block drivers/block: Use octal not symbolic permissions 2018-05-24 13:38:59 -06:00
noop-iosched.c
opal_proto.h
partition-generic.c block: don't print a message when the device went away 2018-05-29 08:59:21 -06:00
scsi_ioctl.c block: consistently use GFP_NOIO instead of __GFP_NORECLAIM 2018-05-14 08:55:18 -06:00
sed-opal.c for-4.17/block-20180402 2018-04-05 14:27:02 -07:00
t10-pi.c