Re: [PATCH] pci_do_scan_bus

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Tue Aug 13 2002 - 14:08:42 EST


> --- linux-2.5.30/drivers/pci/probe.c Thu Aug 1 17:16:10 2002
> +++ linux/drivers/pci/probe.c Tue Aug 6 12:36:53 2002
> /* Create a device template */
> - memset(&dev0, 0, sizeof(dev0));
> - dev0.bus = bus;
> + dev0 = kmalloc(sizeof(struct pci_dev), GFP_ATOMIC);
> + if (dev0 == NULL)
> + BUG();
> + memset(dev0, 0, sizeof(dev0));
> + dev0->bus = bus;

Why is this atomic? I think we do not scan from interrupts,
only from init/swapper and insmod contexts.

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



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:33 EST