Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753796Ab3GIII7 (ORCPT ); Tue, 9 Jul 2013 04:08:59 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49645 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218Ab3GIII5 (ORCPT ); Tue, 9 Jul 2013 04:08:57 -0400 Date: Tue, 9 Jul 2013 10:07:45 +0200 From: Peter Zijlstra To: Masami Hiramatsu Cc: Steven Rostedt , Frederic Weisbecker , Oleg Nesterov , linux-kernel@vger.kernel.org, Ingo Molnar , Arnaldo Carvalho de Melo , Andrew Morton , jovi.zhangwei@huawei.com, Jiri Olsa , Srikar Dronamraju Subject: Re: [RFC PATCH] tracing/kprobe: Wait for disabling all running kprobe handlers Message-ID: <20130709080744.GH25631@dyad.programming.kicks-ass.net> References: <20130708142533.GA23749@redhat.com> <20130709080145.7975.83164.stgit@mhiramat-M0-7522> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130709080145.7975.83164.stgit@mhiramat-M0-7522> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 750 Lines: 18 On Tue, Jul 09, 2013 at 05:01:45PM +0900, Masami Hiramatsu wrote: > + if (wait) { > + /* > + * synchronize with kprobe_trace_func/kretprobe_trace_func > + * to ensure disabled (all running handlers are finished) > + */ > + synchronize_sched(); > + kfree(link); /* Ignored if link == NULL */ > + } What's not clear to me from this comment is if we're only waiting for kfree()? In that case shouldn't we use call_rcu() to free the thing? Or do we need the sync_sched() for other purposes as well? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/