diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2023-10-03 00:43:25 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2023-10-09 23:56:09 +0200 |
commit | bd885fcf28da7da6a2244d30cd45630303c781ed (patch) | |
tree | c10f395203c517f97c0a4a983a509bb5a992ecf2 /samples | |
parent | vfio/cdx: Add parentheses between bitwise AND expression and logical NOT (diff) | |
download | linux-bd885fcf28da7da6a2244d30cd45630303c781ed.tar.xz linux-bd885fcf28da7da6a2244d30cd45630303c781ed.zip |
vfio: Fix smatch errors in vfio_combine_iova_ranges()
smatch reports:
vfio_combine_iova_ranges() error: uninitialized symbol 'last'.
vfio_combine_iova_ranges() error: potentially dereferencing uninitialized 'comb_end'.
vfio_combine_iova_ranges() error: potentially dereferencing uninitialized 'comb_start'.
These errors are only reachable via invalid input, in the case of
@last when we receive an empty rb-tree or for @comb_{start,end} if the
rb-tree is empty or otherwise fails to produce a second node that
reduces the gap. Add tests with warnings for these cases.
Reported-by: Cong Liu <liucong2@kylinos.cn>
Link: https://lore.kernel.org/all/20230920095532.88135-1-liucong2@kylinos.cn
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Link: https://lore.kernel.org/r/20231002224325.3150842-1-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions