projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22e6c1b
)
[PATCH] loop: potential kernel hang waiting for kthread
author
Herbert Poetzl
<herbert@13thfloor.at>
Sun, 26 Mar 2006 09:37:30 +0000
(
01:37
-0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sun, 26 Mar 2006 16:56:57 +0000
(08:56 -0800)
Check that kernel_thread() succeeded, so we don't wait for something which
cannot happen.
Signed-off-by: Herbert Poetzl <herbert@13thfloor.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/loop.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/loop.c
b/drivers/block/loop.c
index 74bf0255e98f44dd2cc405426254a6e9b744f19d..9c3b94e8f03baa7d4138802e01b87e27e511c159 100644
(file)
--- a/
drivers/block/loop.c
+++ b/
drivers/block/loop.c
@@
-839,7
+839,9
@@
static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
set_blocksize(bdev, lo_blocksize);
- kernel_thread(loop_thread, lo, CLONE_KERNEL);
+ error = kernel_thread(loop_thread, lo, CLONE_KERNEL);
+ if (error < 0)
+ goto out_putf;
wait_for_completion(&lo->lo_done);
return 0;