]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
epoll: fix suspicious RCU usage in ep_poll_callback
authorEric Wong <normalperson@yhbt.net>
Tue, 26 Mar 2013 23:25:08 +0000 (10:25 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:30 +0000 (17:12 +1100)
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 <normalperson@yhbt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/eventpoll.c

index 47ae9d96f0ac4d1e7b44fd4d79571b298cd3e510..63b0058f219b249312d6a1709cf045077296e6bf 100644 (file)
@@ -1049,7 +1049,7 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned 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);
        }
 
        /*