lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 1 Apr 2009 18:24:12 -0600
From:	Alex Chiang <achiang@...com>
To:	Jesse Barnes <jbarnes@...tuousgeek.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [git pull] PCI changes for 2.6.30

Hi Linus,

* Jesse Barnes <jbarnes@...tuousgeek.org>:
> On Wed, 1 Apr 2009 10:01:12 -0700 (PDT)
> Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > On Tue, 31 Mar 2009, Jesse Barnes wrote:
> > >
> > > Please consider pulling my PCI tree from
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
> > > linux-next
> > 
> > This produces
> > 
> >   WARNING: drivers/built-in.o(.text+0x69a1): Section mismatch in
> > reference from the function dev_rescan_store() to the
> > function .devinit.text:pci_rescan_bus() The function
> > dev_rescan_store() references the function __devinit
> > pci_rescan_bus(). This is often because dev_rescan_store lacks a
> > __devinit annotation or the annotation of pci_rescan_bus is wrong.
> > 
> > Hmm?
> 
> Arg how did I miss that?  Maybe the last build I did was missing
> hotplug support or something... Anyway looking now (at first glance I
> think pci_rescan_bus needs to drop __devinit).

This patch eliminates the warning in what I think is the correct
manner.

Thanks.

/ac

From: Alex Chiang <achiang@...com>

PCI: annotate pci_rescan_bus as __ref, not __devinit

pci_rescan_bus was annotated as __devinit, which is wrong,
because it will never be part of device initialization.
Howevever, we can't simply drop the annotation, because then we
get section warnings about calling pci_scan_child_bus (which is
correctly marked as __devinit).

pci_rescan_bus will only get built when CONFIG_HOTPLUG is set,
meaning that __devinit is a nop, so we know that pci_scan_child_bus
has not been freed.

Annotate as __ref to silence modpost.

Signed-off-by: Alex Chiang <achiang@...com>
---
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index e2f3dd0..8eb50df 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1220,7 +1220,7 @@ EXPORT_SYMBOL(pci_scan_bus_parented);
  *
  * Returns the max number of subordinate bus discovered.
  */
-unsigned int __devinit pci_rescan_bus(struct pci_bus *bus)
+unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
 {
 	unsigned int max;
 	struct pci_dev *dev;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists