All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chandra Seetharaman <sekharan@us.ibm.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	herbert@13thfloor.at, linux-xfs@oss.sgi.com,
	xfs-masters@oss.sgi.com, Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH 3/3] Assert notifier_block and notifier_call are not in init section
Date: Tue, 25 Apr 2006 15:33:36 -0700	[thread overview]
Message-ID: <1146004416.16539.11.camel@linuxchandra> (raw)
In-Reply-To: <Pine.LNX.4.64.0604251211510.3701@g5.osdl.org>

On Tue, 2006-04-25 at 12:16 -0700, Linus Torvalds wrote:
> 
> On Tue, 25 Apr 2006, Chandra Seetharaman wrote:
> > 
> > Two questions:
> > 1) related to this patch: Do you want me to generate a patch that
> > asserts only notifier calls ?
> 
> I don't really have any strong preferences. It seems a bit strange that 
> we'd do it for notifiers but not for other people. It might be better to 
> try to build it into the build system itself, and get it through the 
> _normal_ "section checking".

I 'll hold off for now then.
> 
> One way to do that would be to make the "register_notifier()" thing just 
> create this dummy asm() that just puts the arguments into a section that 
> doesn't even get loaded, but that cna be checked.
> 
> > 2) Unrelated to this patch: If the _code_ section is never reallocated
> > or reused, what is the purpose of putting _code_ in the init section ?
> > Only to make sure that the init calls are called in order ?
> 
> No, the code section is re-used, it's just never re-used for any other 
> code (since we don't generate code on the fly). So if you pass in a 
> function pointer, you know that if it's in the init section, it means that 
> init-code that was discarded.
> 
> But if you pass in a data pointer, you'll never know if it's a data 
> pointer to the original init-code section, or if it was a data pointer 
> that was just dynamically allocated after the init-code section was freed.

Thanks for the clarification. 
> 
> > PS: I fixed my mailer to put my name. sorry about that.
> 
> Looks good.
> 
> 		Linus
-- 

----------------------------------------------------------------------
    Chandra Seetharaman               | Be careful what you choose....
              - sekharan@us.ibm.com   |      .......you may get it.
----------------------------------------------------------------------



      parent reply	other threads:[~2006-04-25 22:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25  2:35 [PATCH 0/3] Fix for the bug reported by Herbert on 2.6.17-rc2 sekharan
2006-04-25  2:35 ` [PATCH 1/3] Remove __devinitdata from notifier block definitions sekharan
2006-04-25  2:35 ` [PATCH 2/3] Remove __devinit and __cpuinit from notifier_call definitions sekharan
2006-04-25  2:35 ` [PATCH 3/3] Assert notifier_block and notifier_call are not in init section sekharan
2006-04-25  2:47   ` Linus Torvalds
2006-04-25  2:50     ` Linus Torvalds
2006-04-25 19:01     ` Chandra Seetharaman
2006-04-25 19:16       ` Linus Torvalds
2006-04-25 20:26         ` Alan Stern
2006-04-25 20:38           ` Linus Torvalds
2006-04-25 20:54             ` Randy.Dunlap
2006-04-25 22:33         ` Chandra Seetharaman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1146004416.16539.11.camel@linuxchandra \
    --to=sekharan@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=herbert@13thfloor.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@oss.sgi.com \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@osdl.org \
    --cc=xfs-masters@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.