From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Ron Rindjunsky <ron.rindjunsky@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>,
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
Date: Wed, 16 Sep 2026 13:19:04 +0200 [thread overview]
Message-ID: <20260916111904.GA15164@wp.pl> (raw)
In-Reply-To: <20260916073736.2952028-1-lgs201920130244@gmail.com>
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 <lgs201920130244@gmail.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
> ---
> 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
>
prev parent reply other threads:[~2026-09-16 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 7:37 Guangshuo Li
2026-09-16 11:19 ` Stanislaw Gruszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260916111904.GA15164@wp.pl \
--to=stf_xl@wp.pl \
--cc=lgs201920130244@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ron.rindjunsky@intel.com \
--cc=stable@vger.kernel.org \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®