RE: [PATCH] vp_vdpa: fix id_table array not null terminated error

2024-10-31 Thread Lege Wang
hi, > -Original Message- > From: Parav Pandit > Sent: Thursday, October 31, 2024 12:15 PM > To: Lege Wang ; virtualization@lists.linux.dev > Cc: sta...@vger.kernel.org; m...@redhat.com; jasow...@redhat.com > Subject: RE: [PATCH] vp_vdpa: fix id_table array not nul

RE: [PATCH] vp_vdpa: fix id_table array not null terminated error

2024-10-30 Thread Parav Pandit
> From: Xiaoguang Wang > Sent: Thursday, October 31, 2024 9:35 AM > > Allocate one extra virtio_device_id as null terminator, otherwise > vdpa_mgmtdev_get_classes() may iterate multiple times and visit undefined > memory. > > Fixes: ffbda8e9df10 ("vdpa/vp_vdpa : add vdpa tool support in vp_vdp

[PATCH] vp_vdpa: fix id_table array not null terminated error

2024-10-30 Thread Xiaoguang Wang
Allocate one extra virtio_device_id as null terminator, otherwise vdpa_mgmtdev_get_classes() may iterate multiple times and visit undefined memory. Fixes: ffbda8e9df10 ("vdpa/vp_vdpa : add vdpa tool support in vp_vdpa") Cc: sta...@vger.kernel.org Signed-off-by: Xiaoguang Wang --- drivers/vdpa/vi