Merge tag 'v3.10.71' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / tty / pty.c
index abfd9908978188ffe3bfd7a9c3aa3e8c6700c5d9..bdfe8ecc731cc173a7fa19368de0f774d8367aa4 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/slab.h>
 #include <linux/mutex.h>
 
-
 #ifdef CONFIG_UNIX98_PTYS
 static struct tty_driver *ptm_driver;
 static struct tty_driver *pts_driver;
@@ -215,6 +214,9 @@ static int pty_signal(struct tty_struct *tty, int sig)
        unsigned long flags;
        struct pid *pgrp;
 
+       if (sig != SIGINT && sig != SIGQUIT && sig != SIGTSTP)
+               return -EINVAL;
+
        if (tty->link) {
                spin_lock_irqsave(&tty->link->ctrl_lock, flags);
                pgrp = get_pid(tty->link->pgrp);