From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx4.wp.pl (mx4.wp.pl [212.77.101.11]) (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 36AD6488222 for ; Wed, 16 Sep 2026 11:25:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.77.101.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789557975; cv=none; b=XwPEVtGtzTJPjvV51ptoztKMgJSbKXd3NJL8qi5vmhn1Yj6ODqJGpHokF1e6K3sYTv/fkSxtds3WHJ1CedehgH8ZcZUW1bljP7Kym84N8Pit2pXJenbscXLAT7/Q/o7zwzVFSApkJgSxpvW6g/Ndo2orZbo32wDdjvwWitGi2IE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789557975; c=relaxed/simple; bh=R+3NIbEmxJLr+oMhc13WIXNbtNuk0Sei3SCThPTbyxA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d67CTn9ZdeG2m+TqMjnkg24kep/Np2dIvwZiEtJRcSYdrs6ZMqt7B/COvv6BEFvYnr7z293+HRr5dJuUMo3UftXEj5rND5b9swI7dVD9cngd/XRgmLypPtGMv2YJDGiHlQDhG1ldzV5iDWzXgX8O+oKHzRqjorzj32SKsVkcWK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wp.pl; spf=pass smtp.mailfrom=wp.pl; dkim=pass (2048-bit key) header.d=wp.pl header.i=@wp.pl header.b=VEsfktkl; arc=none smtp.client-ip=212.77.101.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wp.pl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wp.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wp.pl header.i=@wp.pl header.b="VEsfktkl" Received: (wp-smtpd smtp.wp.pl 41478 invoked from network); 16 Sep 2026 13:19:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=20241105; t=1789557544; bh=J1ce+vBR72jQkw//XqeqfopumQBMFWBnvlUt11/clpA=; h=From:To:Cc:Subject; b=VEsfktklkcfel3O92dKw3IGUlHun6u9rxpNVVSFXLEDz1oSnxU+EqaVu4lb75uMnr WSbo0c7knJ8aE8hPcJbe0snHRsSfZ1WkEUmRg6q9YUSVSER51mtOq8v1I0B/soVDV/ JzMT32q33Cb8MU86SxuIW+2PJqJX44q+9j4+hk1IPQCAb0lyeu1jTLDe8rH2rKAPQY +6a2x6hhQl5tV+fgQAoERadIYvDpJXzQ5x3H8/nEZWb9wuUPYxSTJzKAfzcSjraJNV eYgwDABHq/hQEdCxYXTqr7QrC3cvB5F0mckXFmySDUDER4vFcKnnG2cUpeGa820sMR 5dv0+1T9ydlJw== Received: from localhost (77-236-6-58.static.play.pl [77.236.6.58]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with TLS_AES_256_GCM_SHA384 encrypted SMTP for ; 16 Sep 2026 13:19:04 +0200 Date: Wed, 16 Sep 2026 13:19:04 +0200 From: Stanislaw Gruszka To: Guangshuo Li Cc: "John W. Linville" , Ron Rindjunsky , Tomas Winkler , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] wifi: iwlegacy: 3945: free EEPROM data on remove Message-ID: <20260916111904.GA15164@wp.pl> References: <20260916073736.2952028-1-lgs201920130244@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260916073736.2952028-1-lgs201920130244@gmail.com> X-WP-MailID: eef6d4e4e276139c5143eea1506d8038 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [IRMx] On Wed, Sep 16, 2026 at 03:37:36PM +0800, Guangshuo Li wrote: > il3945_pci_probe() calls il_eeprom_init(), which allocates memory for > the EEPROM data. The probe failure paths release this allocation with > il_eeprom_free(), but the remove path does not free it after a > successful probe. > > As a result, the EEPROM data is leaked when the PCI device is removed. > > Free the EEPROM data in il3945_pci_remove() before releasing the > mac80211 hardware structure. > > This issue was found by manual code inspection. > > Fixes: 073d3f5f1b3b ("iwlwifi: changing EEPROM layout handling") > Cc: stable@vger.kernel.org > Signed-off-by: Guangshuo Li Acked-by: Stanislaw Gruszka > --- > drivers/net/wireless/intel/iwlegacy/3945-mac.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c > index cbaf250626c5..f7ca182d1494 100644 > --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c > +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c > @@ -3807,6 +3807,7 @@ il3945_pci_remove(struct pci_dev *pdev) > > il_free_channel_map(il); > il_free_geos(il); > + il_eeprom_free(il); > kfree(il->scan_cmd); > dev_kfree_skb(il->beacon_skb); > ieee80211_free_hw(il->hw); > -- > 2.43.0 >