public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.10-rc2 dm.c dm_init unresolved reference to _exits
@ 2004-11-15  4:36 Keith Owens
  2004-11-15 11:23 ` Andries Brouwer
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Owens @ 2004-11-15  4:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andries.Brouwer

ia64 build, gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)

CONFIG_BLK_DEV_DM=y
CONFIG_HOTPLUG=n

drivers/md/dm.c dm_int refers to _exits which is defined as __exitdata.
With CONFIG_HOTPLUG=n, __exitdata is discarded by arch/ia64/kernel/vmlinux.lds.S.

drivers/built-in.o(.init.text+0x1f720): In function `dm_init':
: undefined reference to `_exits'
drivers/built-in.o(.init.text+0x1f730): In function `dm_init':
: undefined reference to `_exits'


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.10-rc2 dm.c dm_init unresolved reference to _exits
  2004-11-15  4:36 2.6.10-rc2 dm.c dm_init unresolved reference to _exits Keith Owens
@ 2004-11-15 11:23 ` Andries Brouwer
  2004-11-16 16:28   ` Alasdair G Kergon
  2004-11-16 17:18   ` Alasdair G Kergon
  0 siblings, 2 replies; 4+ messages in thread
From: Andries Brouwer @ 2004-11-15 11:23 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel, Andries.Brouwer

On Mon, Nov 15, 2004 at 03:36:21PM +1100, Keith Owens wrote:

> ia64 build, gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)
> 
> drivers/md/dm.c dm_int refers to _exits which is defined as __exitdata.
> With CONFIG_HOTPLUG=n, __exitdata is discarded

Yes - thanks for reminding - thought of that yesterday night
but forgot again the next morning.

diff -uprN -X /linux/dontdiff a/drivers/md/dm.c b/drivers/md/dm.c
--- a/drivers/md/dm.c	2004-11-15 11:44:12.000000000 +0100
+++ b/drivers/md/dm.c	2004-11-15 11:46:35.000000000 +0100
@@ -146,7 +146,7 @@ int (*_inits[])(void) __initdata = {
 	dm_interface_init,
 };
 
-void (*_exits[])(void) __exitdata = {
+void (*_exits[])(void) = {
 	local_exit,
 	dm_target_exit,
 	dm_linear_exit,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.10-rc2 dm.c dm_init unresolved reference to _exits
  2004-11-15 11:23 ` Andries Brouwer
@ 2004-11-16 16:28   ` Alasdair G Kergon
  2004-11-16 17:18   ` Alasdair G Kergon
  1 sibling, 0 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2004-11-16 16:28 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: Keith Owens, linux-kernel

On Mon, Nov 15, 2004 at 12:23:23PM +0100, Andries Brouwer wrote:
> Yes - thanks for reminding - thought of that yesterday night
> but forgot again the next morning.
 
Also, because one ordered list has been replaced by two, please add a 
comment to warn anyone editing either list of functions that the two ordered 
lists must correspond: every function in _inits must have an exit function
in the corresponding position in _exits.

The macro looked pretty horrid, but did you consider just expanding it out?

Alasdair


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.10-rc2 dm.c dm_init unresolved reference to _exits
  2004-11-15 11:23 ` Andries Brouwer
  2004-11-16 16:28   ` Alasdair G Kergon
@ 2004-11-16 17:18   ` Alasdair G Kergon
  1 sibling, 0 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2004-11-16 17:18 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: Keith Owens, linux-kernel

On Mon, Nov 15, 2004 at 12:23:23PM +0100, Andries Brouwer wrote:
> On Mon, Nov 15, 2004 at 03:36:21PM +1100, Keith Owens wrote:
> > drivers/md/dm.c dm_int refers to _exits which is defined as __exitdata.
> > With CONFIG_HOTPLUG=n, __exitdata is discarded
> Yes - thanks for reminding - thought of that yesterday night
> but forgot again the next morning.
 
In fact that's the second time someone's introduced a bug like that in
this code: to save someone else from doing it again, please also add 
a comment that the exit functions may be called during init (if an init 
function fails).

Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-16 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15  4:36 2.6.10-rc2 dm.c dm_init unresolved reference to _exits Keith Owens
2004-11-15 11:23 ` Andries Brouwer
2004-11-16 16:28   ` Alasdair G Kergon
2004-11-16 17:18   ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox