diff options
| author | Bandan Das <[email protected]> | 2014-04-02 01:32:59 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2014-04-29 23:36:44 +0000 |
| commit | 8895d3bcb8ba960b1b83f95d772b641352ea8e51 (patch) | |
| tree | fe6a3d11c5e029fc59cef437afede23a63d91d60 /net/unix/af_unix.c | |
| parent | PCI: Add new ID for Intel GPU "spurious interrupt" quirk (diff) | |
| download | kernel-8895d3bcb8ba960b1b83f95d772b641352ea8e51.tar.gz kernel-8895d3bcb8ba960b1b83f95d772b641352ea8e51.zip | |
PCI: Fail new_id for vendor/device values already built into driver
While using the sysfs new_id interface, the user can unintentionally feed
incorrect values if the driver static table has a matching entry. This is
possible since only the device and vendor fields are mandatory and the rest
are optional. As a result, store_new_id() will fill in default values that
are then passed on to the driver and can have unintended consequences.
As an example, consider the ixgbe driver and the 82599EB network card:
echo "8086 10fb" > /sys/bus/pci/drivers/ixgbe/new_id
This will pass a pci_device_id with driver_data = 0 to ixgbe_probe(), which
uses that zero to index a table of card operations. The zeroth entry of
the table does *not* correspond to the 82599 operations.
This change returns an error if the user attempts to add a dynid for a
vendor/device combination for which a static entry already exists.
However, if the user intentionally wants a different set of values, she
must provide all the 7 fields and that will be accepted.
[bhelgaas: drop KVM text since the problem isn't KVM-specific]
Signed-off-by: Bandan Das <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
