From: Johannes Berg <johannes@sipsolutions.net>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Kees Cook <kees@kernel.org>,
"Gustavo A . R . Silva" <gustavoars@kernel.org>,
linux-hardening@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] wifi: cfg80211: simplify cfg80211_mlme_register_mgmt()
Date: Thu, 12 Dec 2024 09:28:52 +0100 [thread overview]
Message-ID: <bb26c5bc9f6c3fd35351b9f9d170ada583d9964d.camel@sipsolutions.net> (raw)
In-Reply-To: <20241210143951.5685-2-dmantipov@yandex.ru>
On Tue, 2024-12-10 at 17:39 +0300, Dmitry Antipov wrote:
> Simplify 'cfg80211_mlme_register_mgmt()' to allocate an instance of
> 'struct cfg80211_mgmt_registration' only if the latter is really
> needed
This part is very much broken, and I don't see that it's actually useful
to add a new "goto" just for the (unlikely) case of not needing the
allocation.
> (i.e. when the list of registrations should be updated)
> and prefer 'kmalloc()' over 'kzalloc()' since all of the members
> are explicitly initialized.
This part I disagree with, who knows what we might add. This isn't a
path where we might possibly care about the cost of zeroing, vs. the
added maintenance requirement.
johannes
next prev parent reply other threads:[~2024-12-12 8:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 14:39 [PATCH 1/2] wifi: cfg80211: annotate struct cfg80211_mgmt_registration with __counted_by() Dmitry Antipov
2024-12-10 14:39 ` [PATCH 2/2] wifi: cfg80211: simplify cfg80211_mlme_register_mgmt() Dmitry Antipov
2024-12-12 8:28 ` Johannes Berg [this message]
2024-12-31 4:59 ` kernel test robot
2024-12-10 16:42 ` [PATCH 1/2] wifi: cfg80211: annotate struct cfg80211_mgmt_registration with __counted_by() Johannes Berg
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=bb26c5bc9f6c3fd35351b9f9d170ada583d9964d.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=dmantipov@yandex.ru \
--cc=gustavoars@kernel.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.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