diff options
author | Satyam Sharma <satyam.sharma@gmail.com> | 2007-07-15 23:40:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 09:05:43 -0700 |
commit | 1e3e8d91fee56e1ab598b265466dc38033f1b915 (patch) | |
tree | b6115a2aa12c650ad8c43b315df9558b3c4ca81b /drivers | |
parent | 60bfba7e85f88fe834e623ead799cf580de20971 (diff) |
rocket.c: fix unchecked mutex_lock_interruptible()
Check the return of mutex_lock_interruptible() in drivers/char/rocket.c and
return ERESTARTSYS if we were interrupted.
Signed-off-by: Satyam Sharma <satyam.sharma@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/rocket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index a3fd7e7ba5a..0270080ff0c 100644 --- 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); |