Skip to contentSkip to conversation

pci_do_scan_bus

PATCH Pete Zaitcev 1 participant 1 message Aug 13, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

drivers/pci/probe.c Tue Aug 6 12:36:53 2002

Quoted 10 lines
drivers/pci/probe.c Tue Aug 6 12:36:53 2002 renamed from drivers/pci/probe.c Thu Aug 1 17:16:10 2002 +5 -2
        /* 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