mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
Remove BUG_ON from n_tty_read()
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> Cc: Horses <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6683549e4b
commit
e9490e93c1
@ -1742,7 +1742,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)
|
||||
|
Loading…
Reference in New Issue
Block a user