From: Kees Cook <kees@kernel.org>
To: Loke Forsberg <loke.forsberg@gmail.com>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
khtsai@google.com, raubcameo@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: f_ncm: replace kzalloc with kzalloc_obj
Date: Thu, 19 Mar 2026 14:11:38 -0700 [thread overview]
Message-ID: <202603191410.9DF140D@keescook> (raw)
In-Reply-To: <202603191337.2EFF6F7A@keescook>
On Thu, Mar 19, 2026 at 01:38:23PM -0700, Kees Cook wrote:
> I was surprised to find this wasn't caught by the original conversion
> script, but I suspect Coccinelle is choking on the use of the cleanup
> attributes:
>
> struct usb_os_desc_table *os_desc_table __free(kfree) = NULL;
> ...
> if (cdev->use_os_string) {
> os_desc_table = kzalloc(sizeof(*os_desc_table), GFP_KERNEL);
>
>
> I'll see if I can figure this out. I may need to send another set of
> bulk replacements...
Ah, it's not so bad. Latest Coccinelle handles the cleanup attributes
correctly:
72 files changed, 104 insertions(+), 117 deletions(-)
--
Kees Cook
prev parent reply other threads:[~2026-03-19 21:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 11:18 [PATCH] usb: gadget: f_ncm: replace kzalloc with kzalloc_obj Loke Forsberg
2026-03-16 6:07 ` Greg KH
2026-03-16 9:08 ` Loke Forsberg
2026-03-19 20:38 ` Kees Cook
2026-03-19 21:11 ` Kees Cook [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=202603191410.9DF140D@keescook \
--to=kees@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=khtsai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=loke.forsberg@gmail.com \
--cc=raubcameo@gmail.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