Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

virtio-net: new section mismatch warning. revert patch?

 
   Soft32 Home -> Linux -> Kernel RSS
Next:  [PATCH] x86: Make sure get_user_desc() doesn't si..  
Author Message
Michael S. Tsirkin

External


Since: May 07, 2009
Posts: 42



(Msg. 1) Posted: Wed Nov 04, 2009 9:20 am
Post subject: virtio-net: new section mismatch warning. revert patch?
Archived from groups: linux>kernel (more info?)

With v2.6.32-rcX I started getting section mismatch warnings for
virtio_net.
make with CONFIG_DEBUG_SECTION_MISMATCH=y shows:

WARNING: drivers/net/virtio_net.o(.data+0x90): Section mismatch in
reference from the variable virtio_net to the function
..devexit.text:virtnet_remove()
The variable virtio_net references
the function __devexit virtnet_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

virtnet_remove was converted to devexit by this commit:

commit 3d1285beff2e8467b8c3884d83b7a91a99aa9fcd
Author: Uwe Kleine-König <u.kleine-koenig.RemoveThis@pengutronix.de>
Date: Wed Sep 30 22:28:34 2009 +0000

move virtnet_remove to .devexit.text

We didn't have these warnings in v2.6.31, so this is a regression.
revert?

--
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Sam Ravnborg

External


Since: Jan 02, 2007
Posts: 614



(Msg. 2) Posted: Wed Nov 04, 2009 1:20 pm
Post subject: Re: virtio-net: new section mismatch warning. revert patch? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, Nov 04, 2009 at 04:17:30PM +0200, Michael S. Tsirkin wrote:
> With v2.6.32-rcX I started getting section mismatch warnings for
> virtio_net.
> make with CONFIG_DEBUG_SECTION_MISMATCH=y shows:
>
> WARNING: drivers/net/virtio_net.o(.data+0x90): Section mismatch in
> reference from the variable virtio_net to the function
> .devexit.text:virtnet_remove()
> The variable virtio_net references
> the function __devexit virtnet_remove()
> If the reference is valid then annotate the
> variable with __exit* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
>
> virtnet_remove was converted to devexit by this commit:
>
> commit 3d1285beff2e8467b8c3884d83b7a91a99aa9fcd
> Author: Uwe Kleine-König <u.kleine-koenig.TakeThisOut@pengutronix.de>
> Date: Wed Sep 30 22:28:34 2009 +0000
>
> move virtnet_remove to .devexit.text
>
> We didn't have these warnings in v2.6.31, so this is a regression.
> revert?

It is correct to annotate the exit function __devexit.
So we should try to silence modpost in other ways.

Two options:
1) annotate the virtio_net variable with __ref to tell
it is allowed to reference __init, __exit annotated stuff.
2) Rename virtio_net to virtio_net_driver

This is not a "my machine no longer works" issue but it would
be nice to have it sorted out one way or the other before next -rc.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Rusty Russell

External


Since: Sep 16, 2003
Posts: 591



(Msg. 3) Posted: Thu Nov 05, 2009 7:21 am
Post subject: Re: virtio-net: new section mismatch warning. revert patch? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 5 Nov 2009 12:47:30 am Michael S. Tsirkin wrote:
> With v2.6.32-rcX I started getting section mismatch warnings for
> virtio_net.
> make with CONFIG_DEBUG_SECTION_MISMATCH=y shows:
>
> WARNING: drivers/net/virtio_net.o(.data+0x90): Section mismatch in
> reference from the variable virtio_net to the function
> .devexit.text:virtnet_remove()
> The variable virtio_net references
> the function __devexit virtnet_remove()
> If the reference is valid then annotate the
> variable with __exit* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
>
> virtnet_remove was converted to devexit by this commit:
>
> commit 3d1285beff2e8467b8c3884d83b7a91a99aa9fcd
> Author: Uwe Kleine-König <u.kleine-koenig.RemoveThis@pengutronix.de>
> Date: Wed Sep 30 22:28:34 2009 +0000
>
> move virtnet_remove to .devexit.text
>
> We didn't have these warnings in v2.6.31, so this is a regression.
> revert?

No, just rename "virtio_net" to "virtio_net_driver". Meanwhile, ignore it.
It's worked well for me so far.

Uwe: I apologize for accepting your patches. I will be more careful in
future.

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[PATCH] fix section mismatch warning in lockdep - lockdep_init() is marked __init but used in several places outside __init code. This causes following warnings: $..

[PATCH] pcie: fix section mismatch warning - Fix following section mismatch warning (when compiled with CONFIG_HOTPLUG=n): WARNING: drivers/pci/built-in.o - Section...

[PATCH] aer: fix section mismatch warning - Fix following section mismatch warning (when compiled with CONFIG_HOTPLUG=n): WARNING: drivers/pci/built-in.o - Section...

[PATCH] Fix "Section mismatch" compile warning - Fix "Section mismatch" warnings in arch/x86_64/kernel/time.c Signed-off-by: Bernhard Walle <bwalle@suse.d...

[PATCH] fix section mismatch warning in initel_cacheinfo - Fix following warning: WARNING: arch/i386/kernel/built-in.o(.init.text+0x3818): Section mismatch: reference to..

[PATCH] fix cpu_llc_id section mismatch warning - From: William Lee Irwin III <wli@holomorphy.com> This patch silences the following warning: WARNING:..
       Soft32 Home -> Linux -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]