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-next>] [day] [month] [year] [list]
Date:   Mon, 11 Feb 2019 11:24:15 +0100
From:   "joro@...tes.org" <joro@...tes.org>
To:     wen yang <yellowriver2010@...mail.com>
Cc:     "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
        Magnus Damm <damm+renesas@...nsource.se>
Subject: Re: [PATCH] iommu/ipmmu-vmsa: fix device reference leaks

Adding a few more people to Cc.

On Sun, Feb 03, 2019 at 10:27:09AM +0000, wen yang wrote:
> Make sure to drop the reference to the device taken by
> of_find_device_by_node() on driver unbind.
> 
> Signed-off-by: Wen Yang <yellowriver2010@...mail.com>
> Cc: Joerg Roedel <joro@...tes.org>
> Cc: iommu@...ts.linux-foundation.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  drivers/iommu/ipmmu-vmsa.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
> index 7a4529c..cebf56d 100644
> --- a/drivers/iommu/ipmmu-vmsa.c
> +++ b/drivers/iommu/ipmmu-vmsa.c
> @@ -756,6 +756,9 @@ static int ipmmu_init_platform_device(struct device *dev,
>  
>  	fwspec->iommu_priv = platform_get_drvdata(ipmmu_pdev);
>  
> +	if (!fwspec->iommu_priv)
> +		put_device(&ipmmu_pdev->dev);
> +
>  	return 0;
>  }
>  
> -- 
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ