From: Zhang Yanmin Date: Fri, 2 Jun 2006 04:35:43 +0000 (+0800) Subject: [PATCH] PCI: fix race with pci_walk_bus and pci_destroy_dev X-Git-Tag: v2.6.18-rc1~1081^2~228^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d71374dafbba7ec3f67371d3b7e9f6310a588808;p=pandora-kernel.git [PATCH] PCI: fix race with pci_walk_bus and pci_destroy_dev pci_walk_bus has a race with pci_destroy_dev. When cb is called in pci_walk_bus, pci_destroy_dev might unlink the dev pointed by next. Later on in the next loop, pointer next becomes NULL and cause kernel panic. Below patch against 2.6.17-rc4 fixes it by changing pci_bus_lock (spin_lock) to pci_bus_sem (rw_semaphore). Signed-off-by: Zhang Yanmin Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed