From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v2] Input: evdev - Flush queues during EVIOCGKEY-like ioctls
Date: Wed, 27 Mar 2013 22:06:35 -0700 [thread overview]
Message-ID: <20130328050635.GA2812@core.coreip.homeip.net> (raw)
In-Reply-To: <1364431764-31378-1-git-send-email-dh.herrmann@gmail.com>
On Thu, Mar 28, 2013 at 01:49:24AM +0100, David Herrmann wrote:
> + spin_lock_irq(&dev->event_lock);
> + spin_lock(&client->buffer_lock);
> +
> + ret = bits_to_user(bits, max, size, p, compat);
This copies data to userspace and thus may sleep. You can not hold spinlocks
here.
I think you need to collect the data, flush the events and then try
copying the data out. If we fail on copying data out - too bad. Maybe we
can stuff SYN_DROPPED in the queue, but it is not really necessary.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2013-03-28 5:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 0:49 [PATCH v2] Input: evdev - Flush queues during EVIOCGKEY-like ioctls David Herrmann
2013-03-28 5:06 ` Dmitry Torokhov [this message]
2013-03-28 9:52 ` David Herrmann
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=20130328050635.GA2812@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dh.herrmann@gmail.com \
--cc=linux-input@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).