summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThorsten Knabe <linux@thorsten-knabe.de>2014-08-23 15:47:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 08:59:49 -0800
commitc8f712403473828d7a72882025114ef42491b1ae (patch)
tree6753651ab7f5539c76f2e25777b71babdad2aa50 /arch
parent119947ac0a0929f3602d6015c49116ea67cbc617 (diff)
downloadlinux-stable-c8f712403473828d7a72882025114ef42491b1ae.tar.gz
linux-stable-c8f712403473828d7a72882025114ef42491b1ae.tar.bz2
linux-stable-c8f712403473828d7a72882025114ef42491b1ae.zip
um: ubd: Fix for processes stuck in D state forever
commit 2a2361228c5e6d8c1733f00653481de918598e50 upstream. Starting with Linux 3.12 processes get stuck in D state forever in UserModeLinux under sync heavy workloads. This bug was introduced by commit 805f11a0d5 (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: 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport) Signed-off-by: Thorsten Knabe <linux@thorsten-knabe.de> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/ubd_kern.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 3716e6952554..e8ab93c3e638 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -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;
@@ -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){