From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F23D449ECE for ; Thu, 22 Jan 2026 08:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769069697; cv=none; b=J9jrLiWRxkIje3vHdwY28cUc8l+ztJNolH+DmGBfONtfO7h335itflEMQB92qO3vrYe87Q3DlXb0LYTViaSCN3BakHQNE4XAXZsy2vfDkvPv69qr/5WKBnUqXWVylPv/kdj8FX43rtx36+rLYsSpS1ljMqgpgJh4Bns1bJnVl9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769069697; c=relaxed/simple; bh=6c9uxmBAZvLojJXj9qaALIUJxWtTB0RvappVQkzTN3I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tObSQs6pKOf4hUJ276usjzGgu37Rc/ij+NLPv8qFpvQ2kZtnl26w+eQ9yLu7E1iisoK+JX+KI4UDwHRIyQvrAwwZrSrSlqKcrjpobXrR4FV8fEov4ZvfOIXQbmz1kZc6HNKunFqSjcYVMQDmNMSt6fQC2pVQhrrb/kUXaxBxfoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QjL7goHX; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QjL7goHX" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-47fedb7c68dso6457495e9.2 for ; Thu, 22 Jan 2026 00:14:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769069693; x=1769674493; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DAOhd4x7MHmbdXf4lk6gDlWzu2IBzRt0vhQbJQeAjnY=; b=QjL7goHXGwHwSjyqzGGQwEnJ+UZgOO12JLjm4mrjMikseQXMiN8ORI+LMgIRU7LUV9 QerVZsbjFn2cMKAWQJdDbved4WQlTyuPoNxH8j6843eFRrAH1ohHrDRsLFTQg/LmkyZV DdWKl7YN+WDH5Ss1yEJ+xpVr3NkgIqGBqisBDbqe8Ayt0GmaWn52UlVA00mlWhtDZN00 Dwx89KiKau5t9VFupA17eOUZbgNqxSNdTg4ke4q6/OPT8ZQelnSjzKE5LG0SYehtQiEi 0QCtbW2Qm3YcRGGgESqebc1CVM5wbX5ve5koc6pKa7UM8LOaR+etTe0jbJPgtGPMNrg5 aFUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769069693; x=1769674493; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DAOhd4x7MHmbdXf4lk6gDlWzu2IBzRt0vhQbJQeAjnY=; b=f6uOiowU2XzmyNybxHkzxm4o77pKblU8gBUxknTezavDUsZGrlrufjqORtne/wGvtg R+nIFVgrJz47Z8QIByEMSEDT2Q2RD9d+JwFf28qHpcPtQIyrEZYDbuNBRw638RY49N6U 3CWFg2SATLNKosTW2bVlf07VIuUThkbt2yndM0yvNw+94KmcXzEHEDbfeguD4RGEQm5Q qJb3Ez+2Y6KxNiZMH7Dl+pz7T7jgziqSjCd0HiZIjQHu2JjB9P5nJgZepax+l9vbenG2 RNJt3EnyOHdzzchPFbOp58HObqtU/8YpEeEuEvlSfDWF2eVcMpi0VMtEk8xYOFcMrUln huGQ== X-Forwarded-Encrypted: i=1; AJvYcCWKYtbxdu5kXhuoAFJDJg+0NN0HiPHUOsDnTjr1JDcjCnBiOuwx/i1PhW90yxB7YN24U1lM7paHxs5HT1E=@vger.kernel.org X-Gm-Message-State: AOJu0YxUyU32jWvsNsFQj0iGH/hJWvNfUnN7qSmVS1Eiqz94lg1EY8YL uZZak2GEhEH4ov2T7seaFkanA8/KD5MjJB/+HoIYpnWS9jnHb6Zz7VjoBaN8IA== X-Gm-Gg: AZuq6aJl89HhCAaKLtmkdD2iK2IAWNETttyOLT9i9T+gjq8v6IPPDXZhUflfhLcQNQH 1QqqQ7nSTMi0ixGI+2mLEPIEXCXica1ujiplIB4gUCr5de48sbnus3glxqWkmKpDfZOUzLv7E8G 1NMxk/TaqBj0ZwUB0QSt5TdFOVimahRPVVCbqL0NPefx2H0y3zrPVQSzW53vIedcjZYtVpfv92d cJo6jxRdxQI8v2CTfPrpOUhjF0+8k3bFKnTF5U62zwdEjwGSFqBKFItDw6lwZCIUqRroTMCeq5/ 7EgaAxbF+zGYHQX7DRiOZpj1diq5E+zO4Z81cGbVT9V2NwIlu6W79C9C56kQDbUrSagelTUqQPA 1U7kGQcwZ5mxBm/NxCJkGn7WXv/A7xacCdq4RHr8sBroinH7lNI3lTcPOQ242fZEoQeRm21YRoh iayXbQex+tRlz4D7OmSvVDO6E6f5m8k8AmLHkKh5UZgAwiixBQ84GvgPeo3XTYA1Jb6TTgm67L0 VQTu9wez6OM1mb/3TI= X-Received: by 2002:a05:600c:1914:b0:47e:e72b:1fce with SMTP id 5b1f17b1804b1-4801e35868emr266298495e9.37.1769069693255; Thu, 22 Jan 2026 00:14:53 -0800 (PST) Received: from shift.daheim (p200300d5ff09750050f496fffe46beef.dip0.t-ipconnect.de. [2003:d5:ff09:7500:50f4:96ff:fe46:beef]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48042c57504sm45212485e9.16.2026.01.22.00.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jan 2026 00:14:52 -0800 (PST) Received: from localhost ([127.0.0.1]) by shift.daheim with esmtp (Exim 4.99.1) (envelope-from ) id 1vippJ-00000000mAt-4BD7; Thu, 22 Jan 2026 09:14:51 +0100 Message-ID: <819fc850-98b4-4a0c-af4d-da2cf41cfcbd@gmail.com> Date: Thu, 22 Jan 2026 09:14:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] wifi: p54: Fix memory leak in p54_beacon_update() To: Zilin Guan Cc: jianhao.xu@seu.edu.cn, johannes.berg@intel.com, johannes@sipsolutions.net, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, quic_rdevanat@quicinc.com References: <71ec168e-423b-4269-88b9-56e08c1d8110@gmail.com> <20260121090507.3442567-1-zilin@seu.edu.cn> Content-Language: de-DE, en-US From: Christian Lamparter In-Reply-To: <20260121090507.3442567-1-zilin@seu.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Zilin, On 1/21/26 10:05 AM, Zilin Guan wrote: > On Tue, Jan 20, 2026 at 09:25:15PM +0100, Christian Lamparter wrote: >> Ok, from what I remember, this return basically is/was and likely will be a dead-code path. >> So adding something there is only there to "look" good for the static analysis tools. >> But many commits like these have been merged before. As long as it is mentioned that >> static analysis was the reason for this. Yeah sure why not. >> >> >> Reason being why this is dead-code is that in order for the path to trigger, mac80211's >> ieee80211_beacon_get must have prepared an invalid beacon (with an invalid TIM Element) >> to start with... And looking at ieee80211_beacon_add_tim_pvb, it still looks to me like >> the IE length can't be less than 3 ever. But, I've been wrong before, if you do see please >> correct me. (If not, you don't neet to really bother with the Fixes-Tag) > > I agree with your analysis. I checked the code and confirmed that mac80211 > guarantees a minimum TIM length of 4 bytes for non-S1G devices. > > I appreciate you accepting this patch to silence the static analysis warning. Phew, and so far no buildbot replied with comments. I have one last request: Can you please add a sentence about that analysis into the commit log as well? Our future selves could maybe appreciate that one day, if this comes up again. Because then we won't have to remember all or search/look for it again, if it's already neatly written down directly there. Thank you, Christian