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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200730102023.GA2249@curiosity>
Date:   Thu, 30 Jul 2020 13:20:23 +0300
From:   Sergey Matyukevich <geomatsi@...il.com>
To:     Wang Hai <wanghai38@...wei.com>
Cc:     imitsyanko@...ntenna.com, kvalo@...eaurora.org,
        davem@...emloft.net, kuba@...nel.org, mst@...hat.com,
        mkarpenko@...ntenna.com, linux-wireless@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] qtnfmac: Missing platform_device_unregister() on
 error in qtnf_core_mac_alloc()

> Add the missing platform_device_unregister() before return from
> qtnf_core_mac_alloc() in the error handling case.
> 
> Fixes: 616f5701f4ab ("qtnfmac: assign each wiphy to its own virtual platform device")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wang Hai <wanghai38@...wei.com>
> ---
>  drivers/net/wireless/quantenna/qtnfmac/core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c
> index eea777f8acea..6aafff9d4231 100644
> --- a/drivers/net/wireless/quantenna/qtnfmac/core.c
> +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c
> @@ -446,8 +446,11 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus,
>  	}
>  
>  	wiphy = qtnf_wiphy_allocate(bus, pdev);
> -	if (!wiphy)
> +	if (!wiphy) {
> +		if (pdev)
> +			platform_device_unregister(pdev);
>  		return ERR_PTR(-ENOMEM);
> +	}
>  
>  	mac = wiphy_priv(wiphy);

Reviewed-by: Sergey Matyukevich <geomatsi@...il.com>

Thanks,
Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ