From: sashiko-bot@kernel.org
To: "Priyanka Mani" <priyankamani2100@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: uvc: fix dwFrameInterval array leak on frame removal
Date: Tue, 03 Nov 2026 06:33:39 +0000 [thread overview]
Message-ID: <sashiko-outbox-194639@kernel.org> (raw)
In-Reply-To: <7f7db2bcb2c5d248cf72a270bd18afc71cf01559.1793687064.git.priyankamani2100@gmail.com>
> uvcg_frame_dw_frame_interval_store() allocates the frame interval array
> and stores it in uvcg_frame::dw_frame_interval. The array is only freed
> when it is replaced by a later write to the dwFrameInterval attribute.
>
> Frame items use the generic uvcg_config_item_release(), which frees the
> frame itself but not the interval array, so the array is leaked every
> time a frame directory is removed after dwFrameInterval was written.
> This happens on every normal teardown of a configfs UVC gadget, and
> kmemleak reports it as:
>
> unreferenced object 0xffff8881027f5040 (size 8):
> comm "uvc-frame-inter", pid 281, jiffies 4294827366
> hex dump (first 8 bytes):
> 15 16 05 00 00 00 00 00 ........
> backtrace (crc 60980708):
> [ ... ]
> functions in a VM.
>
> Fixes: 46919a23ee87 ("usb: gadget: uvc: configfs support in uvc function")
> Cc: stable@vger.kernel.org
> Signed-off-by: Priyanka Mani <priyankamani2100@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/7f7db2bcb2c5d248cf72a270bd18afc71cf01559.1793687064.git.priyankamani2100@gmail.com?part=1
prev parent reply other threads:[~2026-11-03 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 6:29 [PATCH] usb: gadget: uvc: fix dwFrameInterval array leak on frame removal Priyanka Mani
2026-11-03 6:33 ` sashiko-bot [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=sashiko-outbox-194639@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=priyankamani2100@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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