From: Jason Gunthorpe <jgg@ziepe.ca>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
liucong2@kylinos.cn, yishaih@nvidia.com, brett.creeley@amd.com
Subject: Re: [PATCH] vfio: Fix smatch errors in vfio_combine_iova_ranges()
Date: Fri, 6 Oct 2023 13:56:59 -0300 [thread overview]
Message-ID: <20231006165659.GX13795@ziepe.ca> (raw)
In-Reply-To: <20231002224325.3150842-1-alex.williamson@redhat.com>
On Mon, Oct 02, 2023 at 04:43:25PM -0600, Alex Williamson wrote:
> 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
> Cc: Yishai Hadas <yishaih@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
> drivers/vfio/vfio_main.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Yeah, this is much clearer
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Thanks,
Jason
prev parent reply other threads:[~2023-10-06 16:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 9:41 [PATCH] fix build error in function vfio_combine_iova_ranges Cong Liu
2023-09-11 18:44 ` Alex Williamson
2023-09-12 1:07 ` Cong Liu
2023-09-13 12:36 ` Jason Gunthorpe
2023-09-14 9:08 ` [PATCH v2] vfio: Fix uninitialized symbol and potential dereferencing errors in vfio_combine_iova_ranges Cong Liu
2023-09-19 18:04 ` Alex Williamson
2023-09-20 9:55 ` [PATCH v3] " Cong Liu
2023-10-02 22:41 ` Alex Williamson
2023-10-02 22:43 ` [PATCH] vfio: Fix smatch errors in vfio_combine_iova_ranges() Alex Williamson
2023-10-04 15:35 ` Brett Creeley
2023-10-06 16:56 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231006165659.GX13795@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alex.williamson@redhat.com \
--cc=brett.creeley@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liucong2@kylinos.cn \
--cc=yishaih@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®