From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753764AbZBWKVS (ORCPT ); Mon, 23 Feb 2009 05:21:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751664AbZBWKVI (ORCPT ); Mon, 23 Feb 2009 05:21:08 -0500 Received: from mail-bw0-f161.google.com ([209.85.218.161]:54878 "EHLO mail-bw0-f161.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbZBWKVG (ORCPT ); Mon, 23 Feb 2009 05:21:06 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ua4a1MkJDtYVO4HRgzj/8dDGQx5QSjhy6UWuz/G47/fzyx+PPkEG6XQLmvy88/lFdV onFWBsZxZJMm53FVq+/8fWhwcFfwFb/NaWZDP0dqrH9iv/te8lBNT/Kcpg+SXKxnPyv6 LIQra2HXOvJDh+J3fPNk8iZpsqV7knR1xwK8M= MIME-Version: 1.0 In-Reply-To: <20090222162234.GA6003@nowhere> References: <20090221152251.GA6807@nowhere> <20090222162234.GA6003@nowhere> Date: Mon, 23 Feb 2009 11:21:04 +0100 Message-ID: Subject: Re: [PATCH -mm] tracing: Fix section mismatch in trace_hw_branches.c From: Markus Metzger To: Frederic Weisbecker Cc: Rakib Mullick , Ingo Molnar , Andrew Morton , LKML , markus.t.metzger@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 22, 2009 at 5:22 PM, Frederic Weisbecker wrote: > On Sun, Feb 22, 2009 at 07:33:08PM +0600, Rakib Mullick wrote: >> On 2/21/09, Frederic Weisbecker wrote: >> > So, unless I missed something, this patch seems to me very dangerous. >> > The init and reset callbacks of a tracer can be called at any time, not only >> > on initcalls time (__init functions are freed from memory after the middle stage >> > of the boot). >> > With this patch, on UP we will dereference freed memory while activating this tracer. >> If the init and reset callbacks of a tracer can be called regardless >> of cpu hotpluging then it is. If the tracer's init or reset doesn't >> rely on cpuhotplug then it shouldn't use it. >> There's a another way to fix the warning is by remove __cpuinitdata >> from bts_hotcpu_notifier. [...] > But removing __cpuinitdata will mean a kind of waste of memory (though it's only > a little struct). Plus the hotplug handler function. It's still not much. I'll send out a patch following Frederic's suggestion to register the hotplug notifier once in init. thanks and regards, markus.