Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759231AbZDOLKO (ORCPT ); Wed, 15 Apr 2009 07:10:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753392AbZDOLJ7 (ORCPT ); Wed, 15 Apr 2009 07:09:59 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:45560 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751911AbZDOLJ6 (ORCPT ); Wed, 15 Apr 2009 07:09:58 -0400 Date: Wed, 15 Apr 2009 13:09:37 +0200 From: Ingo Molnar To: Oleg Nesterov Cc: Frederic Weisbecker , KOSAKI Motohiro , Zhaolei , Steven Rostedt , Tom Zanussi , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/4] ftrace: introduce workqueue_handler_exit tracepoint and rename workqueue_execution to workqueue_handler_entry Message-ID: <20090415110937.GA27727@elte.hu> References: <20090413125653.6E01.A69D9226@jp.fujitsu.com> <20090413145105.6E07.A69D9226@jp.fujitsu.com> <20090413145159.6E0A.A69D9226@jp.fujitsu.com> <20090413162534.GI5977@nowhere> <20090415102257.GA2617@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090415102257.GA2617@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 21 * Oleg Nesterov wrote: > > > lock_map_acquire(&lockdep_map); > > > + trace_workqueue_handler_entry(cwq->thread, work); > > > f(work); > > > + trace_workqueue_handler_exit(cwq->thread, work); > > This doesn't look right. We must not use "work" after f(work). > work->func() can kfree its work. We can use it as long as we use it as a 'cookie' - i.e. an identifier for visualization/statistics, but dont actually dereference it, right? Ingo -- 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/