[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1362891577.4051.21.camel@edumazet-glaptop>
Date: Sun, 10 Mar 2013 05:59:37 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Eric Wong <normalperson@...t.net>
Cc: Arve Hjønnevåg <arve@...roid.com>,
NeilBrown <neilb@...e.de>, "Rafael J. Wysocki" <rjw@...k.pl>,
linux-kernel@...r.kernel.org,
Davide Libenzi <davidel@...ilserver.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: epoll: possible bug from wakeup_source activation
On Sun, 2013-03-10 at 01:11 +0000, Eric Wong wrote:
>
> static void ep_destroy_wakeup_source(struct epitem *epi)
> {
> - wakeup_source_unregister(epi->ws);
> - epi->ws = NULL;
> + struct wakeup_source *ws = epi->ws;
> +
> + rcu_assign_pointer(epi->ws, NULL);
There is no need to use a memory barrier before setting epi->ws to NULL
You should use RCU_POINTER_INIT()
> + synchronize_rcu(); /* wait for ep_pm_stay_awake to finish */
Wont this add a significant slowdown ?
> + wakeup_source_unregister(ws);
> }
Please add the following in your .config
CONFIG_SPARSE_RCU_POINTER=y
and try :
make C=2 fs/eventpoll.o
And fix all warnings ;)
--
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