From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752287AbYI3D1c (ORCPT ); Mon, 29 Sep 2008 23:27:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751968AbYI3D1G (ORCPT ); Mon, 29 Sep 2008 23:27:06 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:64673 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751483AbYI3D1D (ORCPT ); Mon, 29 Sep 2008 23:27:03 -0400 Message-ID: <48E1853A.5090001@cn.fujitsu.com> Date: Tue, 30 Sep 2008 09:47:38 +0800 From: Lai Jiangshan User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Mathieu Desnoyers CC: Ingo Molnar , Andrew Morton , "Paul E. McKenney" , Linux Kernel Mailing List , Steven Rostedt , Peter Zijlstra , Rusty Russell , "Frank Ch. Eigler" Subject: Re: [PATCH] Markers : marker_synchronize_unregister() References: <48E08B05.7030802@cn.fujitsu.com> <20080929082722.GB18663@elte.hu> <20080929150513.GC11245@Krystal> In-Reply-To: <20080929150513.GC11245@Krystal> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mathieu Desnoyers wrote: > Create marker_synchronize_unregister() which must be called before the end of > exit() to make sure every probe callers have exited the non preemptible section > and thus are not executing the probe code anymore. > > Signed-off-by: Mathieu Desnoyers > CC: Ingo Molnar > CC: Rusty Russell > CC: akpm@linux-foundation.org > CC: "Frank Ch. Eigler" > --- > include/linux/marker.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > Index: linux-2.6-lttng/include/linux/marker.h > =================================================================== > --- linux-2.6-lttng.orig/include/linux/marker.h 2008-07-31 09:12:52.000000000 -0400 > +++ linux-2.6-lttng/include/linux/marker.h 2008-07-31 09:19:31.000000000 -0400 > @@ -142,4 +142,11 @@ extern int marker_probe_unregister_priva > extern void *marker_get_private_data(const char *name, marker_probe_func *probe, > int num); > > +/* > + * marker_synchronize_unregister must be called between the last marker probe > + * unregistration and the end of module exit to make sure there is no caller > + * executing a probe when it is freed. > + */ marker_synchronize_unregister must be called _also_ between unregistration and destruction the data that unregistration-ed probes need to make sure there is no caller executing a probe when it's data is destroyed. > +#define marker_synchronize_unregister() synchronize_sched() > + > #endif