diff options
author | Laura Abbott <labbott@kernel.org> | 2022-01-06 08:09:25 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-01-14 18:50:53 -0500 |
commit | 870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0 (patch) | |
tree | 7234d31dcda0e1cbf89c30949688ce86af475b21 /drivers/hv/hv_common.c | |
parent | 1861ba626ae9b98136f3e504208cdef6b29cd3ec (diff) | |
download | linux-stable-870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0.tar.gz linux-stable-870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0.tar.bz2 linux-stable-870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0.zip |
vdpa: clean up get_config_size ret value handling
The return type of get_config_size is size_t so it makes
sense to change the type of the variable holding its result.
That said, this already got taken care of (differently, and arguably
not as well) by commit 3ed21c1451a1 ("vdpa: check that offsets are
within bounds").
The added 'c->off > size' test in that commit will be done as an
unsigned comparison on 32-bit (safe due to not being signed).
On a 64-bit platform, it will be done as a signed comparison, but in
that case the comparison will be done in 64-bit, and 'c->off' being an
u32 it will be valid thanks to the extended range (ie both values will
be positive in 64 bits).
So this was a real bug, but it was already addressed and marked for stable.
Signed-off-by: Laura Abbott <labbott@kernel.org>
Reported-by: Luo Likang <luolikang@nsfocus.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/hv/hv_common.c')
0 files changed, 0 insertions, 0 deletions