alistair23-linux/drivers/block
Ilya Dryomov 1f2c6651f6 rbd: don't leak parent_spec in rbd_dev_probe_parent()
Currently we leak parent_spec and trigger a "parent reference
underflow" warning if rbd_dev_create() in rbd_dev_probe_parent() fails.
The problem is we take the !parent out_err branch and that only drops
refcounts; parent_spec that would've been freed had we called
rbd_dev_unparent() remains and triggers rbd_warn() in
rbd_dev_parent_put() - at that point we have parent_spec != NULL and
parent_ref == 0, so counter ends up being -1 after the decrement.

Redo rbd_dev_probe_parent() to fix this.

Cc: stable@vger.kernel.org # 3.10+, needs backporting for < 4.2
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-10-23 18:36:03 +02:00
..
aoe Revert "block: remove artifical max_hw_sectors cap" 2015-08-18 13:21:13 -07:00
drbd block: kill merge_bvec_fn() completely 2015-08-13 12:31:57 -06:00
mtip32xx mtip32x: fix regression introduced by blk-mq per-hctx flush 2015-08-25 14:35:51 -06:00
paride Char/Misc driver patches for 4.2-rc1 2015-06-26 14:51:15 -07:00
rsxx block: make generic_make_request handle arbitrarily sized bios 2015-08-13 12:31:33 -06:00
xen-blkback Merge branch 'stable/for-jens-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus 2015-09-23 10:59:44 -06:00
zram zram: fix possible use after free in zcomp_create() 2015-09-17 21:16:07 -07:00
amiflop.c
ataflop.c
brd.c libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
cciss.c cciss: correct the non-resettable board list 2015-05-31 11:14:34 -07:00
cciss.h
cciss_cmd.h
cciss_scsi.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
cciss_scsi.h
cpqarray.c
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
hd.c
ida_cmd.h
ida_ioctl.h
Kconfig libnvdimm, pmem: move pmem to drivers/nvdimm/ 2015-06-24 21:24:10 -04:00
loop.c blk-mq: fix racy updates of rq->errors 2015-10-01 10:10:55 +02:00
loop.h block: loop: don't hold lo_ctl_mutex in lo_open 2015-05-20 09:06:09 -06:00
Makefile libnvdimm, pmem: move pmem to drivers/nvdimm/ 2015-06-24 21:24:10 -04:00
mg_disk.c
nbd.c nbd: flags is a u32 variable 2015-08-17 08:23:01 -06:00
null_blk.c blk-mq: fix racy updates of rq->errors 2015-10-01 10:10:55 +02:00
nvme-core.c blk-mq: fix racy updates of rq->errors 2015-10-01 10:10:55 +02:00
nvme-scsi.c Merge branch 'for-4.2/drivers' of git://git.kernel.dk/linux-block 2015-06-25 15:12:50 -07:00
osdblk.c
pktcdvd.c block: kill merge_bvec_fn() completely 2015-08-13 12:31:57 -06:00
ps3disk.c
ps3vram.c block: make generic_make_request handle arbitrarily sized bios 2015-08-13 12:31:33 -06:00
rbd.c rbd: don't leak parent_spec in rbd_dev_probe_parent() 2015-10-23 18:36:03 +02:00
rbd_types.h
skd_main.c block: have drivers use blk_queue_max_discard_sectors() 2015-07-17 08:41:53 -06:00
skd_s1120.h
smart1,2.h
sunvdc.c
swim.c
swim3.c
swim_asm.S
sx8.c block: rename REQ_TYPE_SPECIAL to REQ_TYPE_DRV_PRIV 2015-05-05 13:40:03 -06:00
umem.c block: make generic_make_request handle arbitrarily sized bios 2015-08-13 12:31:33 -06:00
umem.h
virtio_blk.c blk-mq: fix racy updates of rq->errors 2015-10-01 10:10:55 +02:00
xen-blkfront.c blk-mq: fix racy updates of rq->errors 2015-10-01 10:10:55 +02:00
xsysace.c
z2ram.c