From: Eric Wong Subject: [PATCH mm] epoll: fix suspicious RCU usage in ep_poll_callback Date: Wed, 20 Mar 2013 09:25:30 +0000 Message-ID: <20130320092530.GA12277@dcvr.yhbt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: arve@android.com, davidel@xmailserver.org, eric.dumazet@gmail.com, neilb@suse.de, oleg@redhat.com, rjw@sisk.pl, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: akpm@linux-foundation.org Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org The commit "epoll: use RCU to protect wakeup_source in epitem" introduced the ep_pm_stay_awake_rcu function for ep_poll_callback use, but I left it unused on accident. ep->mtx cannot be held in ep_poll_callback, so RCU should be used here. Signed-off-by: Eric Wong Cc: "Rafael J. Wysocki" Cc: Alexander Viro Cc: Andrew Morton Cc: Arve Hj=F8nnev=E5g Cc: Davide Libenzi Cc: Eric Dumazet Cc: NeilBrown Cc: Oleg Nesterov --- Oops :x fs/eventpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index a4e4ad7..a81f0ea 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1028,7 +1028,7 @@ static int ep_poll_callback(wait_queue_t *wait, u= nsigned mode, int sync, void *k /* If this file is already in the ready list we exit soon */ if (!ep_is_linked(&epi->rdllink)) { list_add_tail(&epi->rdllink, &ep->rdllist); - ep_pm_stay_awake(epi); + ep_pm_stay_awake_rcu(epi); } =20 /* --=20 Eric Wong