Skip to content

Commit

Permalink
um: ubd: Fix for processes stuck in D state forever
Browse files Browse the repository at this point in the history
Starting with Linux 3.12 processes get stuck in D state forever in
UserModeLinux under sync heavy workloads. This bug was introduced by
commit 805f11a (um: ubd: Add REQ_FLUSH suppport).
Fix bug by adding a check if FLUSH request was successfully submitted to
the I/O thread and keeping the FLUSH request on the request queue on
submission failures.

Fixes: 805f11a (um: ubd: Add REQ_FLUSH suppport)
Signed-off-by: Thorsten Knabe <linux@thorsten-knabe.de>
Cc: stable@kernel.org # >= 3.12
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Thorsten Knabe authored and Richard Weinberger committed Oct 13, 2014
1 parent 9e6a57d commit 2a23612
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ static void do_ubd_request(struct request_queue *q)

while(1){
struct ubd *dev = q->queuedata;
if(dev->end_sg == 0){
if(dev->request == NULL){
struct request *req = blk_fetch_request(q);
if(req == NULL)
return;
Expand All @@ -1299,7 +1299,8 @@ static void do_ubd_request(struct request_queue *q)
return;
}
prepare_flush_request(req, io_req);
submit_request(io_req, dev);
if (submit_request(io_req, dev) == false)
return;
}

while(dev->start_sg < dev->end_sg){
Expand Down

0 comments on commit 2a23612

Please sign in to comment.