From: Johannes Berg <johannes@sipsolutions.net>
To: Fedor Pchelkin <pchelkin@ispras.ru>, linux-wireless@vger.kernel.org
Cc: Tova Mussai <tova.mussai@intel.com>,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] wifi: cfg80211: fix leak if split 6 GHz scanning fails
Date: Thu, 28 May 2026 10:42:40 +0200 [thread overview]
Message-ID: <21b5dc35ef16217adce0ef726a603a11951da4d2.camel@sipsolutions.net> (raw)
In-Reply-To: <20260524165320.62089-1-pchelkin@ispras.ru>
On Sun, 2026-05-24 at 19:53 +0300, Fedor Pchelkin wrote:
>
> @@ -1101,7 +1102,12 @@ int cfg80211_scan(struct cfg80211_registered_device *rdev)
> rdev_req->req.scan_6ghz = false;
> rdev_req->req.first_part = true;
> rdev->int_scan_req = request;
> - return rdev_scan(rdev, request);
> + err = rdev_scan(rdev, request);
> + if (err) {
> + kfree(rdev->int_scan_req);
> + rdev->int_scan_req = NULL;
> + }
> + return err;
Given that rdev isn't accessible to the driver call in rdev_scan(), I
think it'd be nicer to do kfree(request) and defer the int_scan_req
assignment to after the rdev_scan() call?
johannes
next prev parent reply other threads:[~2026-05-28 8:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 16:53 [PATCH] wifi: cfg80211: fix leak if split 6 GHz scanning fails Fedor Pchelkin
2026-05-28 8:42 ` Johannes Berg [this message]
2026-06-01 9:25 ` Fedor Pchelkin
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=21b5dc35ef16217adce0ef726a603a11951da4d2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=pchelkin@ispras.ru \
--cc=tova.mussai@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