diff options
author | Stanislav Kozina <skozina@redhat.com> | 2012-08-16 12:01:47 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-07 08:27:24 -0700 |
commit | 0950902e1cf419d6fa060ed5f59e7cecd2400028 (patch) | |
tree | 085f835678a0fa507c537b54c0afaf8278b72d5d /drivers/tty/n_tty.c | |
parent | 8455d77c2b1a558aacef5c61c2d2b73dc8237c8b (diff) | |
download | kernel_samsung_tuna-0950902e1cf419d6fa060ed5f59e7cecd2400028.zip kernel_samsung_tuna-0950902e1cf419d6fa060ed5f59e7cecd2400028.tar.gz kernel_samsung_tuna-0950902e1cf419d6fa060ed5f59e7cecd2400028.tar.bz2 |
Remove BUG_ON from n_tty_read()
commit e9490e93c1978b6669f3e993caa3189be13ce459 upstream.
Change the BUG_ON to WARN_ON and return in case of tty->read_buf==NULL. We want to track a
couple of long standing reports of this but at the same time we can avoid killing the box.
Signed-off-by: Stanislav Kozina <skozina@redhat.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index c3954fb..d7164bf 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -1728,7 +1728,8 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, do_it_again: - BUG_ON(!tty->read_buf); + if (WARN_ON(!tty->read_buf)) + return -EAGAIN; c = job_control(tty, file); if (c < 0) |