From: Eric Dumazet <eric.dumazet@gmail.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: "Arve Hjønnevåg" <arve@android.com>, NeilBrown <neilb@suse.de>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linux-kernel@vger.kernel.org,
"Davide Libenzi" <davidel@xmailserver.org>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: epoll: possible bug from wakeup_source activation
Date: Sun, 10 Mar 2013 05:59:37 +0100 [thread overview]
Message-ID: <1362891577.4051.21.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130310011136.GA4815@dcvr.yhbt.net>
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 ;)
next prev parent reply other threads:[~2013-03-10 4:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 11:26 Eric Wong
2013-03-08 1:30 ` Eric Wong
2013-03-08 4:56 ` Arve Hjønnevåg
2013-03-08 20:49 ` Eric Wong
2013-03-09 4:09 ` Arve Hjønnevåg
2013-03-09 7:10 ` Eric Wong
2013-03-10 1:11 ` Eric Wong
2013-03-10 4:59 ` Eric Dumazet [this message]
2013-03-10 11:50 ` [PATCH] epoll: use RCU protect wakeup_source in epitem Eric Wong
2013-03-14 3:09 ` [PATCH mm] epoll: lock ep->mtx in ep_free to silence lockdep Eric Wong
2013-03-11 23:37 ` epoll: possible bug from wakeup_source activation Arve Hjønnevåg
2013-03-12 0:17 ` Eric Wong
2013-03-12 0:29 ` Arve Hjønnevåg
2013-03-12 0:44 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362891577.4051.21.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arve@android.com \
--cc=davidel@xmailserver.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=normalperson@yhbt.net \
--cc=rjw@sisk.pl \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®