diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-01-24 21:14:33 +0100 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-02-08 22:08:05 +0100 |
commit | 7c867c8899e873652ef98a890d2e647c092bec25 (patch) | |
tree | 482e3c673dd58243be6ed73915fd0c92dc44ca9a /drivers/watchdog/bcm47xx_wdt.c | |
parent | PCI/lpc: irq and pci_ids patch for Intel DH89xxCC DeviceIDs (diff) | |
download | linux-7c867c8899e873652ef98a890d2e647c092bec25.tar.xz linux-7c867c8899e873652ef98a890d2e647c092bec25.zip |
PCI: Avoid potential NULL pointer dereference in pci_scan_bridge
pci_add_new_bus() calls pci_alloc_child_bus() which calls pci_alloc_bus()
that allocates memory dynamically with kzalloc(). The return value of
kzalloc() is the pointer that's eventually returned from
pci_add_new_bus(), so since kzalloc() can fail and return NULL so can
pci_add_new_bus(). Thus we may end up dereferencing a NULL pointer in
drivers/pci/probe.c::pci_scan_bridge(). Seems to me we should test for
this and bail out if it happens rather than crashing.
Also removed some trailing whitespace that bugged me while looking at
this.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/watchdog/bcm47xx_wdt.c')
0 files changed, 0 insertions, 0 deletions