]> git.baikalelectronics.ru Git - kernel.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)
committerJens Axboe <axboe@fb.com>
Thu, 11 May 2017 16:04:30 +0000 (10:04 -0600)
commitc0cd57b3ba1f689fe6996dd1808c34e3ebe7758e
tree98edd7dd6a0d901d705fe94374c983eda5524798
parentdffc271c6db0c12d63cb8d00bb11073cdb101ad6
drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub()

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: 4959df09621e ("locking/atomic, kref: Kill kref_sub()")
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: stable@vger.kernel.org # v4.11
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/drbd/drbd_req.c