summaryrefslogtreecommitdiff
path: root/include/linux/linux_string.h
diff options
context:
space:
mode:
authorAndrew Scull <[email protected]>2022-04-21 16:11:05 +0000
committerTom Rini <[email protected]>2022-05-03 15:50:45 -0400
commite7870c2cdccef3a3a8659995407280900323b9f5 (patch)
tree6f5b3892e0a06fb938266a94e4efab9ac1a335f9 /include/linux/linux_string.h
parent6a8cb878a24257ea64dfbd0f5493f07759eb5a0d (diff)
virtio: pci: Read entire capability into memory
Read the virtio PCI capability out of the device configuration space to a struct rather than accessing fields directly from the configuration space as they are needed. This both makes access to the fields easier and avoids re-reading fields. Re-reading fields could result in time-of-check to time-of-use problems, should the value in the configuration space change. The range check of the `bar` field and the later call to `dm_pci_read_bar32()` is an example of where this could happen. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'include/linux/linux_string.h')
0 files changed, 0 insertions, 0 deletions