From: Takashi Iwai <tiwai@suse.de>
To: Jeffin Philip <jeffinphilip14@gmail.com>
Cc: gregkh@linuxfoundation.org, victor.krawiec@arturia.com,
fanwu01@zju.edu.cn, christophe.jaillet@wanadoo.fr,
kees@kernel.org, balbi@kernel.org, tiwai@suse.de,
dave@stgolabs.net, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
syzbot+d5fa3d224505c8610702@syzkaller.appspotmail.com
Subject: Re: [PATCH] usb: gadget: f_midi: initialize work in f_midi_alloc()
Date: Sun, 16 Aug 2026 12:43:58 +0200 [thread overview]
Message-ID: <87wltqcpld.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260815054006.102325-1-jeffinphilip14@gmail.com>
On Sat, 15 Aug 2026 07:40:06 +0200,
Jeffin Philip wrote:
>
> f_midi_alloc initializes free_ref to 1 and it can only be incremented
> when a sound card is registered via f_midi_register_card().
> f_midi_register_card() is only called in f_midi_bind() which actually
> performs INIT_WORK. If f_midi_bind() is never run, work is not
> initialized and the if condition in f_midi_free becomes true,
> this results in a warning later in __flush_work as work->func = 0.
> Fix this by moving INIT_WORK from f_midi_bind() to f_midi_alloc().
>
> Reported-by: syzbot+d5fa3d224505c8610702@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=d5fa3d224505c8610702
> Fixes: 8653d71ce376 ("usb/gadget: f_midi: Replace tasklet with work")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jeffin Philip <jeffinphilip14@gmail.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
thanks,
Takashi
prev parent reply other threads:[~2026-08-16 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 5:40 [PATCH] usb: gadget: f_midi: initialize work in f_midi_alloc() Jeffin Philip
2026-08-16 10:43 ` 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=87wltqcpld.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=balbi@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dave@stgolabs.net \
--cc=fanwu01@zju.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=jeffinphilip14@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+d5fa3d224505c8610702@syzkaller.appspotmail.com \
--cc=victor.krawiec@arturia.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