projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60bfba7
)
rocket.c: fix unchecked mutex_lock_interruptible()
author
Satyam Sharma
<
[email protected]
>
Mon, 16 Jul 2007 06:40:07 +0000
(23:40 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 16 Jul 2007 16:05:43 +0000
(09:05 -0700)
Check the return of mutex_lock_interruptible() in drivers/char/rocket.c and
return ERESTARTSYS if we were interrupted.
Signed-off-by: Satyam Sharma <
[email protected]
>
Cc: Jiri Slaby <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/rocket.c
patch
|
blob
|
history
diff --git
a/drivers/char/rocket.c
b/drivers/char/rocket.c
index a3fd7e7ba5a977556ccae27fcb4ca2bffa0c4eee..0270080ff0c01bedf874624febcc3a245a995d02 100644
(file)
--- a/
drivers/char/rocket.c
+++ b/
drivers/char/rocket.c
@@
-1702,7
+1702,8
@@
static int rp_write(struct tty_struct *tty,
if (count <= 0 || rocket_paranoia_check(info, "rp_write"))
return 0;
- mutex_lock_interruptible(&info->write_mtx);
+ if (mutex_lock_interruptible(&info->write_mtx))
+ return -ERESTARTSYS;
#ifdef ROCKET_DEBUG_WRITE
printk(KERN_INFO "rp_write %d chars...", count);