From: sashiko-bot@kernel.org
To: "Zhijian Han" <hanzhijian1991@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: gadget: raw_gadget: fix memory leak on connect event failure
Date: Mon, 23 Nov 2026 06:05:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-228751@kernel.org> (raw)
In-Reply-To: <20261123055027.1141887-1-hanzhijian1991@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: gadget: raw_gadget: missing Fixes trailer for gadget_bind()
leak fix
--
commit 94d8269bfbf48dae28738ed0656c12041e15b31d
Author: Zhijian Han <hanzhijian1991@gmail.com>
> usb: gadget: raw_gadget: fix memory leak on connect event failure
>
> gadget_bind() allocates an ep0 request and stores it in dev->req. If
> raw_queue_event() fails to queue the connect event, the function
> returns without releasing the request, leaking it.
>
> Release the request before returning in that case.
>
> Reported-by: syzbot+d83b3c49738aea97c0e5@syzkaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?extid=d83b3c49738aea97c0e5
> Signed-off-by: Zhijian Han <hanzhijian1991@gmail.com>
>
> Changes in v2:
> - Fix author name and add missing Signed-off-by (full name), as
> requested by Greg KH.
>
> - Fix author name and add missing Signed-off-by (full name), as
> requested by Greg KH.
[Severity: Low]
Since this fixes a memory leak in gadget_bind(), should it include a
Fixes: tag:
Fixes: f2c2e717642c ("usb: gadget: add raw-gadget interface")
Also, the "Changes in v2" entry is duplicated in the commit message body.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123055027.1141887-1-hanzhijian1991@gmail.com?part=1
prev parent reply other threads:[~2026-11-23 6:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 2:48 [PATCH 2/2] usb: gadget: raw_gadget: fix memory leak on connect event failure hanzhijian
2026-09-30 18:32 ` Andrey Konovalov
2026-11-20 13:17 ` Greg Kroah-Hartman
2026-11-23 1:18 ` Zhijian Han
2026-11-23 5:50 ` [PATCH v2] " Zhijian Han
2026-11-23 6:00 ` Greg KH
2026-11-23 6:05 ` 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-228751@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=hanzhijian1991@gmail.com \
--cc=linux-usb@vger.kernel.org \
--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