aboutsummaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2015-10-11 19:38:00 +0200
committerMoyster <oysterized@gmail.com>2016-08-26 20:46:24 +0200
commitf520c16bccc50a998eb7b5a0e6b87c11bf2b774f (patch)
treed8795abd4d608c403f12bf8cac495ba73bd1aec1 /include/linux/workqueue.h
parent201225777dc304cac1f85aa5e29342ef4f2a6b1a (diff)
rbd: don't leak parent_spec in rbd_dev_probe_parent()
commit 1f2c6651f69c14d0d3a9cfbda44ea101b02160ba upstream. 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. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> [idryomov@gmail.com: backport to < 4.2: rbd_dev->opts] Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions