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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1eb41038-b732-7498-687e-1e8489ab04be@linux.ibm.com>
Date:   Fri, 18 Jun 2021 11:31:30 -0400
From:   Tony Krowiak <akrowiak@...ux.ibm.com>
To:     "Jason J. Herne" <jjherne@...ux.ibm.com>,
        linux-s390@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, pasic@...ux.ibm.com, jgg@...dia.com
Subject: Re: [PATCH] s390/vfio-ap: Fix module unload memory leak of matrix_dev

Reviewed-by: Tony Krowiak <akrowiak@...ux.ibm.com>

On 6/18/21 9:35 AM, Jason J. Herne wrote:
> vfio_ap_matrix_dev_release is shadowing the global matrix_dev with driver
> data that never gets set. So when release is called we end up not freeing
> matrix_dev. The fix is to remove the shadow variable and just free the
> global.
>
> Signed-off-by: Jason J. Herne <jjherne@...ux.ibm.com>
> ---
>   drivers/s390/crypto/vfio_ap_drv.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index 7dc72cb718b0..6d3eea838e18 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -82,8 +82,6 @@ static void vfio_ap_queue_dev_remove(struct ap_device *apdev)
>   
>   static void vfio_ap_matrix_dev_release(struct device *dev)
>   {
> -	struct ap_matrix_dev *matrix_dev = dev_get_drvdata(dev);
> -
>   	kfree(matrix_dev);
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ