[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 10 Oct 2008 09:35:21 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: Lai Jiangshan <laijs@...fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] markers: bit-field is not thread-safe nor smp-safe
* Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> wrote:
> * Lai Jiangshan (laijs@...fujitsu.com) wrote:
> >
> > bit-field is not thread-safe nor smp-safe.
> >
> > struct marker_entry.rcu_pending is not protected by any lock
> > in rcu-callback free_old_closure().
> > so we must turn it into a safe type.
> >
>
>
> hrm, yes, you are right. I first test for
>
> if (entry->rcu_pending)
> rcu_barrier_sched();
>
> To check if I must execute the rcu callback, and _this_ races against
> the entry->rcu_pending = 0; within the callback.
>
> Your fix is therefore needed.
>
> Thanks !
>
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
applied to tip/tracing/markers, thanks guys!
Ingo
--
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