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:	Wed, 16 Dec 2015 21:02:50 +0000
From:	Okash Khawaja <okash.khawaja@...il.com>
To:	gregkh@...uxfoundation.org
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: fix large frame size compiler warning

On Wed, Dec 16, 2015 at 08:55:45PM +0000, Okash Khawaja wrote:
> Compiling drivers/staging/rtl8192u/ gives following compiler warning:
> 
> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c: In function
> ‘RxReorderIndicatePacket’:
> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:758:1: warning: the
> frame size of 1064 bytes is larger than 1024 bytes
> [-Wframe-larger-than=]
> 
> This patch fixes it by replacing the statically allocated array
> `prxbIndicateArray` with kmalloc'd one.
> 
> Signed-off-by: Okash Khawaja <okash.khawaja@...il.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> index 130c852..d89e99a 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> @@ -594,12 +594,22 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
>  {
>  	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
>  	PRX_REORDER_ENTRY	pReorderEntry = NULL;
> -	struct ieee80211_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
> +	struct ieee80211_rxb **prxbIndicateArray;
>  	u8			WinSize = pHTInfo->RxReorderWinSize;
>  	u16			WinEnd = (pTS->RxIndicateSeq + WinSize -1)%4096;
>  	u8			index = 0;
>  	bool			bMatchWinStart = false, bPktInBuf = false;
>  	IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->RxIndicateSeq is %d, WinSize is %d\n",__func__,SeqNum,pTS->RxIndicateSeq,WinSize);
> +
> +	prxbIndicateArray = kmalloc(sizeof(struct ieee80211_rxb *) *
> +			REORDER_WIN_SIZE, GFP_KERNEL);
> +	if (!prxbIndicateArray) {
> +		IEEE80211_DEBUG(IEEE80211_DL_ERR,
> +				"%s(): kmalloc prxbIndicateArray error\n",
> +				__func__);
> +		return;
> +	}
> +
>  	/* Rx Reorder initialize condition.*/
>  	if (pTS->RxIndicateSeq == 0xffff) {
>  		pTS->RxIndicateSeq = SeqNum;
> -- 
> 2.5.2
>

This doesn't free the kmalloc'd array. Please ignore this. I'll send
another version of this patch.

Thanks
--
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