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]
Date:   Tue, 16 Nov 2021 12:59:12 +0100
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Alagu Sankar <alagusankar@...ex-india.com>,
        Erik Stromdahl <erik.stromdahl@...il.com>,
        Fabio Estevam <festevam@...x.de>,
        Kalle Valo <kvalo@...eaurora.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 187/575] ath10k: high latency fixes for beacon buffer

Hi!

> From: Alagu Sankar <alagusankar@...ex-india.com>
> 
> [ Upstream commit e263bdab9c0e8025fb7f41f153709a9cda51f6b6 ]
> 
> Beacon buffer for high latency devices does not use DMA. other similar
> buffer allocation methods in the driver have already been modified for
> high latency path. Fix the beacon buffer allocation left out in the
> earlier high latency changes.

There's GFP_KERNEL vs. GFP_ATOMIC confusion here:

> @@ -5466,10 +5470,17 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
>  	if (vif->type == NL80211_IFTYPE_ADHOC ||
>  	    vif->type == NL80211_IFTYPE_MESH_POINT ||
>  	    vif->type == NL80211_IFTYPE_AP) {
> -		arvif->beacon_buf = dma_alloc_coherent(ar->dev,
> -						       IEEE80211_MAX_FRAME_LEN,
> -						       &arvif->beacon_paddr,
> -						       GFP_ATOMIC);
> +		if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) {
> +			arvif->beacon_buf = kmalloc(IEEE80211_MAX_FRAME_LEN,
> +						    GFP_KERNEL);
> +			arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
> +		} else {
> +			arvif->beacon_buf =
> +				dma_alloc_coherent(ar->dev,
> +						   IEEE80211_MAX_FRAME_LEN,
> +						   &arvif->beacon_paddr,
> +						   GFP_ATOMIC);
> +		}
>  		if (!arvif->beacon_buf) {
>  			ret = -ENOMEM;
>  			ath10k_warn(ar, "failed to allocate beacon
>  	buffer: %d\n",

I'd expect both allocations to use same GFP_ flags.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ