[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5716d138-ace0-4621-ab34-118610255207@app.fastmail.com>
Date: Sun, 17 Mar 2024 21:20:34 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Philipp Hortmann" <philipp.g.hortmann@...il.com>,
"Dan Carpenter" <dan.carpenter@...aro.org>, "Lee Jones" <lee@...nel.org>
Cc: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
"Larry Finger" <Larry.Finger@...inger.net>,
"Johannes Berg" <johannes@...solutions.net>, "Kalle Valo" <kvalo@...nel.org>
Subject: Re: [RFC] staging: wlan-ng: Driver broken since kernel 5.15
On Sun, Mar 17, 2024, at 21:07, Philipp Hortmann wrote:
> On 3/11/24 08:04, Dan Carpenter wrote:
>> On Sat, Mar 09, 2024 at 11:09:24PM +0100, Philipp Hortmann wrote:
> You are right with the statement that it is this commit.
> commit ea82ff749587807fa48e3277c977ff3cec266f25 (HEAD)
> Author: Lee Jones <lee.jones@...aro.org>
> Date: Wed Apr 14 19:10:39 2021 +0100
>
> staging: wlan-ng: cfg80211: Move large struct onto the heap
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/staging/wlan-ng/cfg80211.c: In function ‘prism2_scan’:
> drivers/staging/wlan-ng/cfg80211.c:388:1: warning: the frame size
> of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> But It is not depending on the line you pointed to.
Right, the kzalloc() already clears the data, so the memset
is not needed.
> I need another week to look into this.
I'm fairly sure this fixes the bug, the problem here was that
the cast to (u8 *) hides the incorrect conversion:
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 471bb310176f..9d6a2dd35ba9 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -350,7 +350,7 @@ static int prism2_scan(struct wiphy *wiphy,
msg2->msgcode = DIDMSG_DOT11REQ_SCAN_RESULTS;
msg2->bssindex.data = i;
- result = p80211req_dorequest(wlandev, (u8 *)&msg2);
+ result = p80211req_dorequest(wlandev, (u8 *)msg2);
if ((result != 0) ||
(msg2->resultcode.data != P80211ENUM_resultcode_success)) {
break;
Arnd
Powered by blists - more mailing lists