From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>
Subject: Re: [RFC PATCH] Input: evdev - drop redundant list-locking
Date: Sun, 20 Jul 2014 11:54:06 -0700 [thread overview]
Message-ID: <20140720185406.GA4446@core.coreip.homeip.net> (raw)
In-Reply-To: <1405882092-7005-1-git-send-email-dh.herrmann@gmail.com>
On Sun, Jul 20, 2014 at 08:48:12PM +0200, David Herrmann wrote:
> evdev->client_list is rcu-protected. There is no need to have a
> separate spinlock just for the list. Either one is good enough, so lets
> drop the spinlock.
>
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> ---
> Hi
>
> I stumbled across this one when doing some evdev reviews. Maybe I'm missing
> something obvious and I should stop coding on Sundays. But the RCU-protection
> should be enough here, right?
RCU protection is for traversing list only, writes (as is adding and removing
elements from client_list) still have to be mutually exclusive.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2014-07-20 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-20 18:48 [RFC PATCH] Input: evdev - drop redundant list-locking David Herrmann
2014-07-20 18:54 ` Dmitry Torokhov [this message]
2014-07-20 19:00 ` David Herrmann
2014-07-20 19:53 ` Dmitry Torokhov
2014-07-20 20:03 ` [PATCH v2] " 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=20140720185406.GA4446@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dh.herrmann@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=rydberg@euromail.se \
/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).