linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Kalle Valo <kvalo@kernel.org>,
	"kernel-dev@igalia.com" <kernel-dev@igalia.com>
Subject: RE: [PATCH 1/4] wifi: rtlwifi: remove unused check_buddy_priv
Date: Wed, 27 Nov 2024 05:32:41 +0000	[thread overview]
Message-ID: <65b5fa04242744bc93e26a137f1fbe58@realtek.com> (raw)
In-Reply-To: <20241122172718.465539-2-cascardo@igalia.com>

Thadeu Lima de Souza Cascardo <cascardo@igalia.com> wrote:
> Commit 2461c7d60f9f ("rtlwifi: Update header file") introduced a global
> list of private data structures.
> 
> Later on, commit 26634c4b1868 ("rtlwifi Modify existing bits to match
> vendor version 2013.02.07") started adding the private data to that list at
> probe time and added a hook, check_buddy_priv to find the private data from
> a similar device.
> 
> However, that function was never used.
> 
> Besides, though there is a lock for that list, it is never used. And when
> the probe fails, the private data is never removed from the list. This
> would cause a second probe to access freed memory.
> 
> Remove the unused hook, structures and members, which will prevent the
> potential race condition on the list and its corruption during a second
> probe when probe fails.
> 
> Fixes: 26634c4b1868 ("rtlwifi Modify existing bits to match vendor version 2013.02.07")

This is a cleanup patch, so I don't think we need a strong Fixes tag. 



  reply	other threads:[~2024-11-27  5:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 17:27 [PATCH 0/4] wifi: rtlwifi probe error path fixes Thadeu Lima de Souza Cascardo
2024-11-22 17:27 ` [PATCH 1/4] wifi: rtlwifi: remove unused check_buddy_priv Thadeu Lima de Souza Cascardo
2024-11-27  5:32   ` Ping-Ke Shih [this message]
2024-11-27  9:17     ` Thadeu Lima de Souza Cascardo
2024-11-22 17:27 ` [PATCH 2/4] wifi: rltwifi: destroy workqueue at rtl_deinit_core Thadeu Lima de Souza Cascardo
2024-11-27  5:35   ` Ping-Ke Shih
2024-11-27  9:19     ` Thadeu Lima de Souza Cascardo
2024-11-27  9:35       ` Ping-Ke Shih
2024-11-22 17:27 ` [PATCH 3/4] wifi: rtlwifi: fix memory leaks and invalid access at probe error path Thadeu Lima de Souza Cascardo
2024-11-27  6:38   ` Ping-Ke Shih
2024-11-22 17:27 ` [PATCH 4/4] wifi: rtlwifi: pci: wait for firmware loading before releasing memory Thadeu Lima de Souza Cascardo
2024-11-27  6:39   ` Ping-Ke Shih
2024-11-27  6:44 ` [PATCH 0/4] wifi: rtlwifi probe error path fixes Ping-Ke Shih
2024-11-27  9:13   ` Thadeu Lima de Souza Cascardo

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=65b5fa04242744bc93e26a137f1fbe58@realtek.com \
    --to=pkshih@realtek.com \
    --cc=cascardo@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).