[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZFZ7Emy9VMYK33za@corigine.com>
Date: Sat, 6 May 2023 18:06:42 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Amitkumar Karwar <amitkarwar@...il.com>,
Ganapathi Bhat <ganapathi017@...il.com>,
Sharvari Harisangam <sharvari.harisangam@....com>,
Xinming Hu <huxinming820@...il.com>,
Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
chunfan chen <jeffc@...vell.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, Xinming Hu <huxm@...vell.com>,
Amitkumar Karwar <akarwar@...vell.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH wireless] mwifiex: Fix the size of a memory allocation in
mwifiex_ret_802_11_scan()
On Sat, May 06, 2023 at 03:53:15PM +0200, Christophe JAILLET wrote:
> The type of "mwifiex_adapter->nd_info" is "struct cfg80211_wowlan_nd_info",
> not "struct cfg80211_wowlan_nd_match".
>
> Use struct_size() to ease the computation of the needed size.
>
> The current code over-allocates some memory, so is safe.
> But it wastes 32 bytes.
>
> Fixes: 7d7f07d8c5d3 ("mwifiex: add wowlan net-detect support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists