Commit:     1e3e8d91fee56e1ab598b265466dc38033f1b915
Parent:     60bfba7e85f88fe834e623ead799cf580de20971
Author:     Satyam Sharma <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 15 23:40:07 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:05:43 2007 -0700

    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 <[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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index a3fd7e7..0270080 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;
        printk(KERN_INFO "rp_write %d chars...", count);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to