Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754779AbXFLLVS (ORCPT ); Tue, 12 Jun 2007 07:21:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752649AbXFLLVI (ORCPT ); Tue, 12 Jun 2007 07:21:08 -0400 Received: from wr-out-0506.google.com ([64.233.184.237]:7583 "EHLO wr-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbXFLLVF (ORCPT ); Tue, 12 Jun 2007 07:21:05 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QD9EitCJMNRJh0s4O6N7DlqlvrdWs7+vdJtassqeN5CZ3v6hz4gFAdwMWkTZu/BDRX4SJSL+p4ldJTtKxUZOfISBTtzcoTtlVPbM9dJrLwvcdfxXHTWiqO4mUyBOASJjk1VsnbGYhRc13uYZdDlYnHjQk+FQ6Yyu0164j1vxzJM= Message-ID: Date: Tue, 12 Jun 2007 16:51:04 +0530 From: "Satyam Sharma" To: "Jan Beulich" Subject: Re: [PATCH] fix improper .init-type section references Cc: "Sam Ravnborg" , linux-kernel@vger.kernel.org In-Reply-To: <466E89EB.76E4.0078.0@novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <466E66AE.76E4.0078.0@novell.com> <466E89EB.76E4.0078.0@novell.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1781 Lines: 40 On 6/12/07, Jan Beulich wrote: > >> -static __init void kthreadd_setup(void) > >> +static noinline __init_refok void kthreadd_setup(void) > >> { > >> struct task_struct *tsk = current; > > > >This isn't ok. There isn't any __init function that is (safely) referenced > >by kthreadd_setup(), so we shouldn't really be marking it as such. > >Also, kthreadd_setup() is really only ever called at init time, so we'd > >want it to remain __init. > > Oh, I see, I misunderstood the purpose of the tag - I assumed it would > mark an __init function that is known to only be referenced from init-only > code paths inside non-init functions (i.e. I didn't pay attention that the > resulting section's name is .text.init.refok, not .init.text.refok). > > I have to admit I have some difficulty understanding when the tags > are going to be useful the way they are implemented right now. Yup, I had discussed precisely the same issue (whether to associate __init_refok with callers or callees) with Sam earlier, but he thought it'd be more useful to have normal-caller-can-ref-init-callees semantics for the same. > >I believe the correct fix to silence modpost here would be to mark its > >caller kthreadd() also as __init, because it too is used only at init time? > > I don't think so - it is my understanding that this is the body of a thread > that never dies. Ugh, yes, I'm smoking God-knows-what, and you're absolutely correct! So we should be marking kthreadd() as __init_refok instead, it seems. Satyam - 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/