lkml.org 
[lkml]   [2006]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pci_walk_bus race condition
On Fri, 02 Jun 2006 12:35:43 +0800
"Zhang, Yanmin" <yanmin_zhang@linux.intel.com> wrote:

> 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).

How does s/spinlock/rwsem/ fix a race??
-
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/

\
 
 \ /
  Last update: 2006-06-02 07:10    [W:0.040 / U:23.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site