]> git.baikalelectronics.ru Git - uboot.git/commit
virtio: pci: Bounds check device config access
authorAndrew Scull <ascull@google.com>
Thu, 21 Apr 2022 16:11:01 +0000 (16:11 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 3 May 2022 19:50:45 +0000 (15:50 -0400)
commit4458cca14d32ceb571b0b96f0c9f07cd55997697
treedc7c87455a4050791ddc3109bea442f42440fedc
parentb02aa56eb0def0bd89dcb3e48975ed6839955e8f
virtio: pci: Bounds check device config access

The device config is optional, so check it was present and mapped before
trying to use the pointer. Bounds violations are an error, not just a
warning, so bail if the checks fail.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/virtio/virtio_pci_modern.c