summaryrefslogtreecommitdiff
path: root/block/kyber-iosched.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2018-02-23 18:36:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-09 09:41:05 +0300
commit7f43f610c4bb8e4da69923d0ce0c60a82073bf2c (patch)
tree48a0e743f559842b3f25e0b0ead2002d638c4eea /block/kyber-iosched.c
parent17644a0bbb190b6286106e98392f3d60ee020a23 (diff)
downloadlinux-7f43f610c4bb8e4da69923d0ce0c60a82073bf2c.tar.xz
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/kyber-iosched.c')
-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,