Commit 1e3e8d91 authored by Satyam Sharma's avatar Satyam Sharma Committed by Linus Torvalds

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: default avatarSatyam Sharma <satyam.sharma@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 60bfba7e
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment