Merge tag 'v3.10.71' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / tty / pty.c
index 8c1b8789690ce9fedb40b422151cc5b6fbb010e2..bdfe8ecc731cc173a7fa19368de0f774d8367aa4 100644 (file)
@@ -214,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);