mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
PCI: Check dynids driver_data value for validity
Only accept dynids whose driver_data value matches one of the driver's pci_driver_id entries. This prevents the user from accidentally passing values the drivers do not expect. Cc: Milton Miller <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
This commit is contained in:
parent
edbc25caaa
commit
b41d6cf38e
4 changed files with 20 additions and 10 deletions
|
|
@ -163,6 +163,10 @@ need pass only as many optional fields as necessary:
|
|||
o class and classmask fields default to 0
|
||||
o driver_data defaults to 0UL.
|
||||
|
||||
Note that driver_data must match the value used by any of the pci_device_id
|
||||
entries defined in the driver. This makes the driver_data field mandatory
|
||||
if all the pci_device_id entries have a non-zero driver_data value.
|
||||
|
||||
Once added, the driver probe routine will be invoked for any unclaimed
|
||||
PCI devices listed in its (newly updated) pci_ids list.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue