Re: [RFC PATCH] Input: evdev - drop redundant list-locking
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2014-07-20 18:54:08
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2014-07-20 18:54:08
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 <redacted> --- 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