aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSatyam Sharma <satyam.sharma@gmail.com>2007-07-16 02:40:07 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:43 -0400
commit1e3e8d91fee56e1ab598b265466dc38033f1b915 (patch)
treeb6115a2aa12c650ad8c43b315df9558b3c4ca81b /drivers
parent60bfba7e85f88fe834e623ead799cf580de20971 (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index a3fd7e7ba5a9..0270080ff0c0 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1702,7 +1702,8 @@ static int rp_write(struct tty_struct *tty,
1702 if (count <= 0 || rocket_paranoia_check(info, "rp_write")) 1702 if (count <= 0 || rocket_paranoia_check(info, "rp_write"))
1703 return 0; 1703 return 0;
1704 1704
1705 mutex_lock_interruptible(&info->write_mtx); 1705 if (mutex_lock_interruptible(&info->write_mtx))
1706 return -ERESTARTSYS;
1706 1707
1707#ifdef ROCKET_DEBUG_WRITE 1708#ifdef ROCKET_DEBUG_WRITE
1708 printk(KERN_INFO "rp_write %d chars...", count); 1709 printk(KERN_INFO "rp_write %d chars...", count);