lkml.org 
[lkml]   [2001]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] races in access to pci_devices
Alexander Viro wrote:
>
> Linus, as far as I can see there's no exclusion between
> the code that walks pci_devices and pci_insert_device(). It's
> not a big deal wrt security (not many laptops with remote access)
> but...
>
> What locking is supposed to be there?

alas, yes, that's been there since time began, and since the window was
so minimal nobody cared enough to do anything about it. Even on the
larger hotplug PCI servers that Greg KH mentioned, the pci list really
isn't traversed much, much less updated.

I haven't looked at it in over a year, but from a quick look, all the
list access look like they can be protected by a simple spinlock.
You'll need to grep the tree, though, because not all users of
pci_devices are in drivers/pci/pci.c. [users outside of drivers/pci
should really be converted to use pci_find_xxx functions in any case]

--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

-
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: 2005-03-22 13:13    [W:0.080 / U:22.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site