summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2018-02-23 23:36:57 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-08 22:41:05 -0800
commit7f43f610c4bb8e4da69923d0ce0c60a82073bf2c (patch)
tree48a0e743f559842b3f25e0b0ead2002d638c4eea /block
parent17644a0bbb190b6286106e98392f3d60ee020a23 (diff)
downloadlinux-stable-7f43f610c4bb8e4da69923d0ce0c60a82073bf2c.tar.gz
linux-stable-7f43f610c4bb8e4da69923d0ce0c60a82073bf2c.tar.bz2
linux-stable-7f43f610c4bb8e4da69923d0ce0c60a82073bf2c.zip
block: kyber: fix domain token leak during requeue
commit ba989a01469d027861e55c8f1121edadef757797 upstream. When requeuing request, the domain token should have been freed before re-inserting the request to io scheduler. Otherwise, the assigned domain token will be leaked, and IO hang can be caused. Cc: Paolo Valente <paolo.valente@linaro.org> Cc: Omar Sandoval <osandov@fb.com> Cc: stable@vger.kernel.org Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/kyber-iosched.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index f58cab82105b..09cd5cf2e459 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -814,6 +814,7 @@ static struct elevator_type kyber_sched = {
.limit_depth = kyber_limit_depth,
.prepare_request = kyber_prepare_request,
.finish_request = kyber_finish_request,
+ .requeue_request = kyber_finish_request,
.completed_request = kyber_completed_request,
.dispatch_request = kyber_dispatch_request,
.has_work = kyber_has_work,