From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wfout8-smtp.messagingengine.com (wfout8-smtp.messagingengine.com [64.147.123.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 310761EB2D for ; Sun, 17 Mar 2024 20:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710706860; cv=none; b=E+IA4TR477/7BAD7wpt2tmnyk4rhIP7aInJPVl4YOlk6peiLt5cVVXZiUFmCeDnHrayiuu7HB6Nblf6c0DVBe8pkEKW7fFpXbtHcz+6We3I+wsG4lfznCdWGkX3Z2hnhg5HrhoYDUNvgn+a4KM1K/G1rFq5Fy/BUxn4le3+ZrJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710706860; c=relaxed/simple; bh=/1v7Vj6mpZndRJ2eX6+FUyOOJ7RtQ+j9vPkLALQZgAM=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=j49fovNFbcBSX9QC7OoxENQ2EXr//mXcWfhEpFtWkFPQpDMkmrr/COvOrbTCnn/WkZEqOJGc2rZKb4Oqpk7bdgdFgDuPHzBetsdrF3gQmbNLdU68Daygupnp2xYhL4GtxwYvI5Q08WYJyx6P3A2VnLbQf2FVeDpdn6RbPp5MWVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=C/uVcQgP; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hV0P8wI+; arc=none smtp.client-ip=64.147.123.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="C/uVcQgP"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hV0P8wI+" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id 9B93F1C000BF; Sun, 17 Mar 2024 16:20:56 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Sun, 17 Mar 2024 16:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1710706856; x=1710793256; bh=6HrRUHpYXtmNtwn+NXIkI2LhSUVC7t5pMaTnPTvJqzA=; b= C/uVcQgPeNZzFNajaT9i48G1eVpZV83W8eXFp4qaMkEN0pU+66bys2zs3JAtoPDa ulKWcUxR4UD2LkXXeeSgoCqeJng2Mf1hqh3uKDDh0uwDjJHsP7WO3FFpF4hNOGaj /cpcjVahuc63MWtMeqdJCzNLvb9STt7tzly29kE2H8ePu0VWyhZlg3Ef5ziv37aS EbVNiPfxjl3Xk7cKCRkaE8Fhxs2x0OQ9yfhsL97D1NzN47nzhsphok5vA62mTDk3 KSh+JjYUN+BTlCjNjXLx0b7UmmvfUINbSg2uAGq2Rgt2Q4IhSL67elkrUlPnBT6F BXSezF6ymmuxtAsMJuCHOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1710706856; x= 1710793256; bh=6HrRUHpYXtmNtwn+NXIkI2LhSUVC7t5pMaTnPTvJqzA=; b=h V0P8wI+qYNmmHPjirwWAC/ncxDmy1f6OGNfjSfg/8K/JPM2qOI2ru/t/pPcglaGc lOiWamZTrKoOsliVFgoTMmvx5jRpIf3NclgRy/P5K7ODamjaUqkP2ikv6NCUMuVl SAw31wIY1ojr9XTkcdJAgDiyhWKojeAIupdTZmz0ekSORKBZddHn2vrrFswlumfB i3cxcod71/VW+oJrGdE8MigzdyiBG+rEKFKsuBpkHS4/AsEoqGKJ6vpIa3Rb4Clt TrYaKx35+BdZH9TXs9/McfT2IufFWlZe0U/7uU8wEKowVLMjrF5ZkZaq6jcFF0hw sVkVtS7oh6fKVNfLEENjw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeehgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C1B81B6008D; Sun, 17 Mar 2024 16:20:55 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-300-gdee1775a43-fm-20240315.001-gdee1775a Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <5716d138-ace0-4621-ab34-118610255207@app.fastmail.com> In-Reply-To: <6c772d15-d249-4175-93f4-ca523006129b@gmail.com> References: <6dc14151-e71e-4118-826d-3ca5c8ee907f@gmail.com> <6c772d15-d249-4175-93f4-ca523006129b@gmail.com> Date: Sun, 17 Mar 2024 21:20:34 +0100 From: "Arnd Bergmann" To: "Philipp Hortmann" , "Dan Carpenter" , "Lee Jones" Cc: "Greg Kroah-Hartman" , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, "Larry Finger" , "Johannes Berg" , "Kalle Valo" Subject: Re: [RFC] staging: wlan-ng: Driver broken since kernel 5.15 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 > Date: Wed Apr 14 19:10:39 2021 +0100 > > staging: wlan-ng: cfg80211: Move large struct onto the heap > > Fixes the following W=3D1 kernel build warning(s): > > drivers/staging/wlan-ng/cfg80211.c: In function =E2=80=98prism2_= scan=E2=80=99: > drivers/staging/wlan-ng/cfg80211.c:388:1: warning: the frame siz= e=20 > of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=3D] > > 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-n= g/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 =3D DIDMSG_DOT11REQ_SCAN_RESULTS; msg2->bssindex.data =3D i; =20 - result =3D p80211req_dorequest(wlandev, (u8 *)&msg2); + result =3D p80211req_dorequest(wlandev, (u8 *)msg2); if ((result !=3D 0) || (msg2->resultcode.data !=3D P80211ENUM_resultcode_success)) { break; Arnd