[Precise] Section mismatch warnings

Tetsuo Handa from-ubuntu at I-love.SAKURA.ne.jp
Fri Mar 30 15:05:46 UTC 2012


Tim Gardner wrote:
> This is a multi-part message in MIME format.
> 
> On 03/28/2012 11:47 PM, Tetsuo Handa wrote:
> > load_elf_binary() is definitely called after initialization.
> 
> Good catch. This same issue also exists in older kernels where we've
> applied the NX emulation patches.

OK. Then, I think we also want to fix these warnings probably introduced by
commit a6021559 "UBUNTU: SAUCE: (no-up) Modularize vesafb".

WARNING: drivers/video/vesafb.o(.exit.text+0x42): Section mismatch in reference from the function vesafb_remove() to the (unknown reference) .init.data:(unknown)
The function __exit vesafb_remove() references
a (unknown reference) __initdata (unknown).
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
(unknown) so it may be used outside an init section.

WARNING: drivers/video/vesafb.o(.exit.text+0x4a): Section mismatch in reference from the function vesafb_remove() to the variable .init.data:vesafb_fix
The function __exit vesafb_remove() references
a variable __initdata vesafb_fix.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
vesafb_fix so it may be used outside an init section.



  49 static struct fb_fix_screeninfo vesafb_fix __initdata = {
  50         .id     = "VESA VGA",
  51         .type   = FB_TYPE_PACKED_PIXELS,
  52         .accel  = FB_ACCEL_NONE,
  53 };

 527 static int __exit vesafb_remove(struct platform_device *device)
 528 {
 529         struct fb_info *info = dev_get_drvdata(&device->dev);
 530 
 531         unregister_framebuffer(info);
 532 #ifdef CONFIG_MTRR
 533         {
 534                 struct vesafb_info *vfb_info = (struct vesafb_info *) info->par;
 535                 if (vfb_info->mtrr_hdl >= 0)
 536                         mtrr_del(vfb_info->mtrr_hdl, 0, 0);
 537         }
 538 #endif
 539         iounmap(info->screen_base);
 540         framebuffer_release(info);
 541         release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
                                           |                      |
                              These values are no longer valid upon unloading.
 542 
 543         return 0;
 544 }




More information about the kernel-team mailing list