diff options
| author | Eli Cohen <[email protected]> | 2022-01-11 18:33:59 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <[email protected]> | 2022-01-14 23:50:54 +0000 |
| commit | f8ae3a489b21b05c39a0a1a7734f2a0188852177 (patch) | |
| tree | 0f35a899de9f653482a351e3d4157e9a35d22660 /lib/test_overflow.c | |
| parent | vdpa: Protect vdpa reset with cf_mutex (diff) | |
| download | kernel-f8ae3a489b21b05c39a0a1a7734f2a0188852177.tar.gz kernel-f8ae3a489b21b05c39a0a1a7734f2a0188852177.zip | |
vdpa/mlx5: Fix is_index_valid() to refer to features
Make sure the decision whether an index received through a callback is
valid or not consults the negotiated features.
The motivation for this was due to a case encountered where I shut down
the VM. After the reset operation was called features were already
clear, I got get_vq_state() call which caused out array bounds
access since is_index_valid() reported the index value.
So this is more of not hit a bug since the call shouldn't have been made
first place.
Signed-off-by: Eli Cohen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Si-Wei Liu<[email protected]>
Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions
