]> www.infradead.org Git - users/dwmw2/linux.git/commit
watch_queue: Fix missing rcu annotation
authorDavid Howells <dhowells@redhat.com>
Thu, 28 Jul 2022 09:31:06 +0000 (10:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:00:44 +0000 (12:00 +0200)
commit45a84f04a9a08a43a4ef7f6d5a965fbf664c802f
treecfe3e3a9d64fd785a487e4ad7dad634f34ef24d2
parentb38a8802c52d5ed9a0256b6ff95229e9f454e93e
watch_queue: Fix missing rcu annotation

commit e0339f036ef4beb9b20f0b6532a1e0ece7f594c6 upstream.

Since __post_watch_notification() walks wlist->watchers with only the
RCU read lock held, we need to use RCU methods to add to the list (we
already use RCU methods to remove from the list).

Fix add_watch_to_object() to use hlist_add_head_rcu() instead of
hlist_add_head() for that list.

Fixes: c73be61cede5 ("pipe: Add general notification queue support")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/watch_queue.c