From: Ralf Lici <ralf@mandelbit.com>
To: stable@vger.kernel.org
Cc: regressions@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ran Wang <ran.wang_1@nxp.com>, Duoming Zhou <duoming@zju.edu.cn>,
linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Ben Hutchings <ben@decadent.org.uk>
Subject: [REGRESSION] 6.1.y/6.6.y: fsl-usb fails to build
Date: Thu, 27 Aug 2026 17:43:00 +0200 [thread overview]
Message-ID: <20260827154302.706689-1-ralf@mandelbit.com> (raw)
Hi,
While working on some backport patches for an out-of-tree module and
looking for the exact versions containing the disable_delayed_work_sync
symbol, I stumbled upon occurrences of that function on longterm v6.1
and v6.6 in drivers/usb/phy/phy-fsl-usb.c despite not being declared or
defined anywhere. In fact, disable_delayed_work_sync was introduced by
upstream commit 86898fa6b8cd ("workqueue: Implement disable/enable for
(delayed) work items") and is only available since v6.10. Neither 6.1.y
nor 6.6.y defines it.
Consequently, kernels built with CONFIG_FSL_USB2_OTG fail with:
drivers/usb/phy/phy-fsl-usb.c:990:2: error: call to undeclared function 'disable_delayed_work_sync'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
990 | disable_delayed_work_sync(&fsl_otg_dev->otg_event);
| ^
drivers/usb/phy/phy-fsl-usb.c:990:2: note: did you mean 'cancel_delayed_work_sync'?
include/linux/workqueue.h:470:13: note: 'cancel_delayed_work_sync' declared here
470 | extern bool cancel_delayed_work_sync(struct delayed_work *dwork);
| ^
I reproduced the failure on PowerPC using corenet64_smp_defconfig with
CONFIG_FSL_USB2_OTG=m, building drivers/usb/phy/phy-fsl-usb.o with
Clang.
AFAICT, in 6.1.y, the regression was introduced in v6.1.160 by commit
4476c73bbbb0 ("usb: phy: fsl-usb: Fix use-after-free in delayed work
during device removal") and remains present in v6.1.185.
In 6.6.y, it was introduced in v6.6.120 by commit 319f7a85b3c4 ("usb:
phy: fsl-usb: Fix use-after-free in delayed work during device removal")
and remains present in v6.6.154.
Note that the same problem was pointed out by Ben Hutchings during the
5.10.y review:
https://lore.kernel.org/all/d147f0eb71f9cefbfb7605e95d98564d7f0ed346.camel@decadent.org.uk/
The corresponding patches were dropped from 5.10.y and 5.15.y, but
appear to have been retained in 6.1.y and 6.6.y.
Simply replacing disable_delayed_work_sync with cancel_delayed_work_sync
at its current location may not be sufficient: it looks like the delayed
work can also be scheduled from fsl_otg_set_host and from the IRQ
handler but I'm not familiar with this part of the kernel.
Cheers!
--
Ralf Lici
Mandelbit Srl
next reply other threads:[~2026-08-27 15:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 15:43 Ralf Lici [this message]
2026-08-28 5:44 ` [REGRESSION] 6.1.y/6.6.y: fsl-usb fails to build Greg Kroah-Hartman
2026-08-28 7:05 ` Ralf Lici
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=20260827154302.706689-1-ralf@mandelbit.com \
--to=ralf@mandelbit.com \
--cc=ben@decadent.org.uk \
--cc=duoming@zju.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ran.wang_1@nxp.com \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).