diff options
author | 2021-10-19 15:01:43 +0800 | |
---|---|---|
committer | 2021-11-01 05:26:48 -0400 | |
commit | 6ae6ff6f6e7d2f304a12a53af8298e4f16ad633e (patch) | |
tree | 4a2beb6835b7b4412ba05db98f1cdb1919de256a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | virtio-pmem: add myself as virtio-pmem maintainer (diff) | |
download | wireguard-linux-6ae6ff6f6e7d2f304a12a53af8298e4f16ad633e.tar.xz wireguard-linux-6ae6ff6f6e7d2f304a12a53af8298e4f16ad633e.zip |
virtio-blk: validate num_queues during probe
If an untrusted device neogitates BLK_F_MQ but advertises a zero
num_queues, the driver may end up trying to allocating zero size
buffers where ZERO_SIZE_PTR is returned which may pass the checking
against the NULL. This will lead unexpected results.
Fixing this by failing the probe in this case.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20211019070152.8236-2-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions