lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201015125211.3ff46dc1@w520.home>
Date:   Thu, 15 Oct 2020 12:52:11 -0600
From:   Alex Williamson <alex.williamson@...hat.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Diana Craciun <diana.craciun@....nxp.com>,
        Cornelia Huck <cohuck@...hat.com>,
        Eric Auger <eric.auger@...hat.com>, kvm@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio/fsl-mc: fix the return of the uninitialized
 variable ret

On Thu, 15 Oct 2020 13:22:26 +0100
Colin King <colin.king@...onical.com> wrote:

> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently the success path in function vfio_fsl_mc_reflck_attach is
> returning an uninitialized value in variable ret. Fix this by setting
> this to zero to indicate success.
> 
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: f2ba7e8c947b ("vfio/fsl-mc: Added lock support in preparation for interrupt handling")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/vfio/fsl-mc/vfio_fsl_mc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> index 80fc7f4ed343..42a5decb78d1 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> @@ -84,6 +84,7 @@ static int vfio_fsl_mc_reflck_attach(struct vfio_fsl_mc_device *vdev)
>  		vfio_fsl_mc_reflck_get(cont_vdev->reflck);
>  		vdev->reflck = cont_vdev->reflck;
>  		vfio_device_put(device);
> +		ret = 0;
>  	}
>  
>  unlock:

Looks correct to me, unless Diana would rather set the initial value to
zero instead.  Thanks,

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ