On 02/08/2010 11:27 AM, Matthew Wilcox wrote: > On Mon, Feb 08, 2010 at 11:23:38AM -0800, Yinghai Lu wrote: >>> Applied this one, thanks. Yinghai, let me know if things still fail >>> for you and we can replace this patch. >> >> ok to me. >> it includes dev null checking in that function. > > You keep bringing that up, but the following patch should also solve > the problem you found: > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 11824d7..a06887f 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -1271,12 +1279,14 @@ int pci_scan_slot(struct pci_bus *bus, int devfn) > return 0; /* Already scanned the entire slot */ > > dev = pci_scan_single_device(bus, devfn); > - if (dev && !dev->is_added) /* new device? */ > + if (!dev) > + return 0; > + if (!dev->is_added) > nr++; > > if (pci_ari_enabled(bus)) > next_fn = next_ari_fn; > - else if (dev && dev->multifunction) > + else if (dev->multifunction) > next_fn = next_trad_fn; > > for (fn = next_fn(dev, 0); fn > 0; fn = next_fn(dev, fn)) { > > I added the earlier hunk to fix other problems (which haven't been reported, > but could theoretically happen). > ok, only with this piece fix that problem. thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html