Skip to content
Commit 4e39ecad authored by Xiaoguang Wang's avatar Xiaoguang Wang Committed by Michael S. Tsirkin
Browse files

vp_vdpa: fix id_table array not null terminated error



Allocate one extra virtio_device_id as null terminator, otherwise
vdpa_mgmtdev_get_classes() may iterate multiple times and visit
undefined memory.

Fixes: ffbda8e9 ("vdpa/vp_vdpa : add vdpa tool support in vp_vdpa")
Cc: stable@vger.kernel.org
Suggested-by: default avatarParav Pandit <parav@nvidia.com>
Signed-off-by: default avatarAngus Chen <angus.chen@jaguarmicro.com>
Signed-off-by: default avatarXiaoguang Wang <lege.wang@jaguarmicro.com>
Message-Id: <20241105133518.1494-1-lege.wang@jaguarmicro.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarParav Pandit <parav@nvidia.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
parent 97ee04fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment