On Thu, Sep 15, 2022 at 11:18:27AM -0600, Alex Williamson wrote: > External email: Use caution opening links or attachments > > > On error, vfio_get_iommu_info() frees and clears *info, but > vfio_connect_container() continues to use the pointer regardless > of the return value. Restructure the code such that a failure > of this function triggers an error and clean up the remainder of > the function, including updating an outdated comment that had > drifted from its relevant line of code and using host page size > for a default for better compatibility on non-4KB systems. > > Reported-by: Nicolin Chen <nicol...@nvidia.com> > Link: https://lore.kernel.org/all/20220910004245.2878-1-nicol...@nvidia.com/ > Signed-off-by: Alex Williamson <alex.william...@redhat.com>
Reviewed-by: Nicolin Chen <nicol...@nvidia.com> Tested-by: Nicolin Chen <nicol...@nvidia.com> Thanks!