Commit 4e39eca
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: ffbda8e ("vdpa/vp_vdpa : add vdpa tool support in vp_vdpa")
Cc: [email protected]
Suggested-by: Parav Pandit <[email protected]>
Signed-off-by: Angus Chen <[email protected]>
Signed-off-by: Xiaoguang Wang <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Parav Pandit <[email protected]>
Acked-by: Jason Wang <[email protected]>1 parent 97ee04f commit 4e39eca
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
616 | 620 | | |
617 | 621 | | |
618 | 622 | | |
| |||
632 | 636 | | |
633 | 637 | | |
634 | 638 | | |
635 | | - | |
636 | | - | |
| 639 | + | |
| 640 | + | |
637 | 641 | | |
638 | 642 | | |
639 | 643 | | |
| |||
0 commit comments