Re: [PATCH 02/11] virtio: pci: Bounds check device config access

Bin Meng
2022-03-24T14:07:50Z

On Sun, Mar 20, 2022 at 7:41 PM Andrew Scull <ascull@google.com> wrote:
>
> 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>
> ---
> drivers/virtio/virtio_pci_modern.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>