From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "founder.fang" <founder.fang@gmail.com>
Cc: jkosina@suse.cz, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: hidraw: fix nonblock read return EAGAIN after device removed
Date: Mon, 26 Nov 2012 00:15:12 -0800 [thread overview]
Message-ID: <20121126081512.GD21091@core.coreip.homeip.net> (raw)
In-Reply-To: <CAHLfQUnhEQBC+yzB3jFnJbB7jMvuVjr1M62kzxWzMN2v0i=VzA@mail.gmail.com>
Hi Founder,
On Mon, Nov 26, 2012 at 10:30:37AM +0800, founder.fang wrote:
> Hi Linux-Input, Jiri, Dmitry,
> this patch is related to nonblock read on hidraw device.
> when nonblock read the condition check (file->f_flags & O_NONBLOCK)
> always be true,
> signal_pending and device exist checking never get a chance to run, so
> the user mode code always
> get EAGAIN even if device removed. move nonblock mode checking to the
> last can fix this problem.
>
> Signed-off-by: Founder Fang <founder.fang@gmail.com>
>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Makes sense to me. However it looks like your mailer line-wrapped the
patch, please resend so Jiri can apply it.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2012-11-26 8:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 7:20 [PATCH] HID: hidraw: fix nonblock read return EAGAIN after device removed founder.fang
2012-11-26 2:30 ` founder.fang
2012-11-26 8:15 ` Dmitry Torokhov [this message]
2012-11-26 13:18 ` Jiri Kosina
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=20121126081512.GD21091@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=founder.fang@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).