From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Stanislav Kozina <skozina@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH] Remove BUG_ON from n_tty_read()
Date: Fri, 10 Aug 2012 14:29:36 +0200 [thread overview]
Message-ID: <20120810122935.GA2410@redhat.com> (raw)
In-Reply-To: <5024E7B2.4030205@redhat.com>
On Fri, Aug 10, 2012 at 12:51:30PM +0200, Stanislav Kozina wrote:
> Change the BUG_ON to WARN_ON and return in case of tty->read_buf==NULL
A few small nitpicks.
Subject should include "tty:" prefix.
> - BUG_ON(!tty->read_buf);
> + if (!tty->read_buf) {
> + WARN_ON(!tty->read_buf);
> + return -EAGAIN;
> + }
This usually is done in two lines:
if (WARN_ON())
return;
Additionally, second BUG_ON(!tty->read_buf) in n_tty_read() should be
probably replaced too.
Thanks
Stanislaw
next prev parent reply other threads:[~2012-08-10 12:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 15:41 Patch for panic in n_tty_read() Stanislav Kozina
2012-06-26 14:21 ` Alan Cox
2012-07-20 12:18 ` Stanislav Kozina
2012-07-20 15:11 ` Alan Cox
2012-07-27 12:05 ` Stanislav Kozina
2012-07-27 12:50 ` Alan Cox
2012-07-30 11:58 ` Stanislav Kozina
2012-08-08 7:58 ` Stanislav Kozina
2012-08-08 9:00 ` Alan Cox
2012-08-08 12:09 ` Stanislav Kozina
2012-08-08 12:26 ` Alan Cox
2012-08-08 14:32 ` Stanislav Kozina
2012-08-08 14:28 ` [PATCH V2] [tty] Fix possible race " Stanislav Kozina
2012-08-08 15:27 ` Alan Cox
2012-08-09 11:16 ` Stanislaw Gruszka
2012-08-13 15:26 ` Stanislaw Gruszka
2012-08-14 11:15 ` Stanislav Kozina
2012-08-09 11:24 ` Stanislav Kozina
2012-08-09 12:35 ` Alan Cox
2012-08-10 10:52 ` Stanislav Kozina
2012-08-10 10:51 ` [PATCH] Remove BUG_ON from n_tty_read() Stanislav Kozina
2012-08-10 12:29 ` Stanislaw Gruszka [this message]
2012-08-10 14:53 ` Stanislav Kozina
2012-08-10 14:38 ` [PATCH V2] " Stanislav Kozina
2012-08-16 7:52 ` Stanislav Kozina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120810122935.GA2410@redhat.com \
--to=sgruszka@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=skozina@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).