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: <565EEC2C.7030501@broadcom.com>
Date:	Wed, 2 Dec 2015 14:03:40 +0100
From:	Arend van Spriel <arend@...adcom.com>
To:	Colin King <colin.king@...onical.com>,
	<kernel-tram@...ts.ubuntu.com>,
	Brett Rudley <brudley@...adcom.com>,
	Franky Lin <frankyl@...adcom.com>,
	Hante Meuleman <meuleman@...adcom.com>,
	Kalle Valo <kvalo@...eaurora.org>,
	Pieter-Paul Giesberts <pieterpg@...adcom.com>,
	Arnd Bergmann <arnd@...db.de>,
	<linux-wireless@...r.kernel.org>,
	<brcm80211-dev-list@...adcom.com>, <netdev@...r.kernel.org>
CC:	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] brcmfmac: only lock and unlock fws if fws is not null

On 12/02/2015 12:45 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> There is a null ptr check for fws to set bcmc_credit_check, however,
> there a lock and unlock on fws should only performed if fwts is
> also not null to also avoid a potential null pointer deference.

Acked-by: Arend van Spriel <arend@...adcom.com>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>   drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> index 086cac3..092f33f 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> @@ -1609,10 +1609,11 @@ static int brcmf_fws_notify_bcmc_credit_support(struct brcmf_if *ifp,
>   {
>   	struct brcmf_fws_info *fws = ifp->drvr->fws;
>
> -	brcmf_fws_lock(fws);
> -	if (fws)
> +	if (fws) {
> +		brcmf_fws_lock(fws);
>   		fws->bcmc_credit_check = true;
> -	brcmf_fws_unlock(fws);
> +		brcmf_fws_unlock(fws);
> +	}
>   	return 0;
>   }
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ