From: Takashi Iwai <tiwai@suse.de>
To: John Keeping <jkeeping@inmusicbrands.com>
Cc: linux-usb@vger.kernel.org, Takashi Iwai <tiwai@suse.de>,
stable@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kees Cook <kees@kernel.org>,
Abdul Rahim <abdul.rahim@myyahoo.com>,
Jeff Johnson <quic_jjohnson@quicinc.com>,
Michael Grzeschik <m.grzeschik@pengutronix.de>,
Daniel Mack <zonque@gmail.com>, Felipe Balbi <balbi@ti.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: gadget: f_midi: fix MIDI Streaming descriptor lengths
Date: Fri, 31 Jan 2025 09:01:10 +0100 [thread overview]
Message-ID: <87tt9f4dkp.wl-tiwai@suse.de> (raw)
In-Reply-To: <20250130195035.3883857-1-jkeeping@inmusicbrands.com>
On Thu, 30 Jan 2025 20:50:34 +0100,
John Keeping wrote:
>
> While the MIDI jacks are configured correctly, and the MIDIStreaming
> endpoint descriptors are filled with the correct information,
> bNumEmbMIDIJack and bLength are set incorrectly in these descriptors.
>
> This does not matter when the numbers of in and out ports are equal, but
> when they differ the host will receive broken descriptors with
> uninitialized stack memory leaking into the descriptor for whichever
> value is smaller.
>
> The precise meaning of "in" and "out" in the port counts is not clearly
> defined and can be confusing. But elsewhere the driver consistently
> uses this to match the USB meaning of IN and OUT viewed from the host,
> so that "in" ports send data to the host and "out" ports receive data
> from it.
>
> Cc: stable@vger.kernel.org
> Fixes: c8933c3f79568 ("USB: gadget: f_midi: allow a dynamic number of input and output ports")
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Thanks!
Takashi
prev parent reply other threads:[~2025-01-31 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 19:50 [PATCH v2] usb: gadget: f_midi: fix MIDI Streaming descriptor lengths John Keeping
2025-01-31 8:01 ` Takashi Iwai [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=87tt9f4dkp.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=abdul.rahim@myyahoo.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=jkeeping@inmusicbrands.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=quic_jjohnson@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=zonque@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 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.