Messages in this thread | | | Subject | Re: epoll: possible bug from wakeup_source activation | From | Eric Dumazet <> | Date | Sun, 10 Mar 2013 05:59:37 +0100 |
| |
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 ;)
| |