All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Haoli Zhang" <26031212468@stu.xidian.edu.cn>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: gadget: f_midi2: disable endpoints before freeing descriptors
Date: Fri, 20 Nov 2026 09:29:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-224849@kernel.org> (raw)
In-Reply-To: <20261120092129.1388279-1-26031212468@stu.xidian.edu.cn>

> The dummy_hcd driver keeps pointers to endpoint descriptors while endpoints
> are enabled. Its timer dereferences these pointers in find_endpoint().
> However, f_midi2_unbind() frees the function descriptors, while
> f_midi2_disable() currently only resets operation_mode. Disable the
> endpoints before the unbind callback releases their descriptors.
> 
> Disable the MIDI 1.0 endpoints and all MIDI 2.0 endpoints from
> f_midi2_disable(). Check each endpoint pointer because the configured
> direction can leave an endpoint unallocated. Keep f_midi2_stop_eps()
> unchanged so altsetting transitions retain their existing request cleanup
> behavior.
> 
> Fixes: 8b645922b223 ("usb: gadget: Add support for USB MIDI 2.0 function driver")
> Reported-by: syzbot+599d4e8994a656eafe15@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=599d4e8994a656eafe15
> Co-developed-by: Jinning Zhang <25031212117@stu.xidian.edu.cn>
> Signed-off-by: Jinning Zhang <25031212117@stu.xidian.edu.cn>
> Co-developed-by: Bin Yu <byu@xidian.edu.cn>
> Signed-off-by: Bin Yu <byu@xidian.edu.cn>
> Signed-off-by: Haoli Zhang <26031212468@stu.xidian.edu.cn>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261120092129.1388279-1-26031212468@stu.xidian.edu.cn?part=1


      reply	other threads:[~2026-11-20  9:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  4:26 [PATCH] usb: gadget: f_midi2: disable endpoints before freeing descriptors Haoli Zhang
2026-11-20  4:38 ` sashiko-bot
2026-11-20  8:10 ` Greg KH
2026-11-20  8:10 ` Greg KH
2026-11-20  9:21 ` [PATCH v2] " Haoli Zhang
2026-11-20  9:29   ` 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-224849@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=26031212468@stu.xidian.edu.cn \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.