]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub()
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 11 May 2017 08:21:46 +0000 (10:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:46:27 +0000 (15:46 +0200)
commitece6ff2261337579b682dad3d93b0265eb744ab7
tree7a2535e8032594ec085b112318ddfb1ca5a74baa
parent78111082778af2dd4391df547f2bb18f06236090
drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub()

commit a00ebd1cf12c378a1d4f7a1d6daf1d76c1eaad82 upstream.

When killing kref_sub(), the unconditional additional kref_get()
was not properly paired with the necessary kref_put(), causing
a leak of struct drbd_requests (~ 224 Bytes) per submitted bio,
and breaking DRBD in general, as the destructor of those "drbd_requests"
does more than just the mempoll_free().

Fixes: bdfafc4ffdd2 ("locking/atomic, kref: Kill kref_sub()")
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/drbd/drbd_req.c