summaryrefslogtreecommitdiffstats
path: root/drivers/block/cryptoloop.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2015-10-11 19:38:00 +0200
committerIlya Dryomov <idryomov@gmail.com>2015-10-23 18:36:03 +0200
commit1f2c6651f69c14d0d3a9cfbda44ea101b02160ba (patch)
treee306645e6644fe420d3bd45388f5b4e33c1cac4c /drivers/block/cryptoloop.c
parent7379047d5585187d1288486d4627873170d0005a (diff)
downloadlinux-1f2c6651f69c14d0d3a9cfbda44ea101b02160ba.tar.bz2
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>
Diffstat (limited to 'drivers/block/cryptoloop.c')
0 files changed, 0 insertions, 0 deletions