lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 20 Mar 2013 09:25:30 +0000
From:	Eric Wong <normalperson@...t.net>
To:	akpm@...ux-foundation.org
Cc:	arve@...roid.com, davidel@...ilserver.org, eric.dumazet@...il.com,
	neilb@...e.de, oleg@...hat.com, rjw@...k.pl,
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: [PATCH mm] epoll: fix suspicious RCU usage in ep_poll_callback

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@...t.net>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Arve Hjønnevåg <arve@...roid.com>
Cc: Davide Libenzi <davidel@...ilserver.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>
Cc: NeilBrown <neilb@...e.de>
Cc: Oleg Nesterov <oleg@...hat.com>
---
  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, 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);
 	}
 
 	/*
-- 
Eric Wong

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ