From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] races in access to pci_devices
Date: Thu, 15 Nov 2001 02:55:52 -0500 [thread overview]
Message-ID: <3BF37508.6EA78A85@mandrakesoft.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0111142257510.1095-100000@weyl.math.psu.edu>
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
next prev parent reply other threads:[~2001-11-15 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-15 4:00 [RFC] races in access to pci_devices Alexander Viro
2001-11-15 5:24 ` Greg KH
2001-11-15 7:55 ` Jeff Garzik [this message]
2001-11-15 8:00 ` Alexander Viro
2001-11-15 8:28 ` Andrew Morton
2001-11-15 16:35 ` Patrick Mochel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3BF37508.6EA78A85@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox