mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-14 11:16:58 +02:00
f_acm calls usb_ep_disable(f_acm->ep_notify) unconditionally in acm_start_ctrl(), even if the USB endpoint was never enabled before. This causes crashes for some UDC drivers (e.g. ci_udc), because they dereference data structures that are assigned only after having called usb_ep_enable(). The f_acm driver in U-Boot is similar to the Linux driver, where this issue does not occur because usb_ep_disable() and usb_ep_enable() internally track the enabled state. In Linux this change was made in commit b0bac2581c19 ("usb: gadget: introduce 'enabled' flag in struct usb_ep") by Robert Baldyga. Fix the crashes for f_acm by making the same change in U-Boot. This makes the API less bug-prone and avoids introducing crashes when adapting new gadget drivers from Linux. Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Link: https://lore.kernel.org/r/20250407-acm-fixes-v1-3-e3dcb592d6d6@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org> |
||
---|---|---|
.. | ||
byteorder | ||
clk | ||
mfd/syscon | ||
mtd | ||
soc/ti | ||
unaligned | ||
usb | ||
apm_bios.h | ||
apple-mailbox.h | ||
arm-smccc.h | ||
asn1_ber_bytecode.h | ||
asn1_decoder.h | ||
asn1.h | ||
bch.h | ||
bitfield.h | ||
bitmap.h | ||
bitops.h | ||
bitrev.h | ||
bug.h | ||
build_bug.h | ||
clk-provider.h | ||
compat.h | ||
compiler_attributes.h | ||
compiler_types.h | ||
compiler-clang.h | ||
compiler-gcc.h | ||
compiler-intel.h | ||
compiler.h | ||
completion.h | ||
const.h | ||
crc7.h | ||
crc16.h | ||
crc32.h | ||
ctype.h | ||
delay.h | ||
dma-direction.h | ||
dma-mapping.h | ||
drm_dp_helper.h | ||
edd.h | ||
err.h | ||
errno.h | ||
ethtool.h | ||
fb.h | ||
if_ether.h | ||
if_vlan.h | ||
immap_qe.h | ||
input.h | ||
intel-smc.h | ||
io.h | ||
ioctl.h | ||
iopoll.h | ||
ioport.h | ||
kbuild.h | ||
kconfig.h | ||
kernel.h | ||
libfdt_env.h | ||
libfdt.h | ||
linkage.h | ||
linux_string.h | ||
list_sort.h | ||
list.h | ||
litex.h | ||
log2.h | ||
lzo.h | ||
math64.h | ||
mbus.h | ||
mdio.h | ||
mii.h | ||
netdevice.h | ||
oid_registry.h | ||
poison.h | ||
posix_types.h | ||
printk.h | ||
pruss_driver.h | ||
psci.h | ||
rational.h | ||
rbtree_augmented.h | ||
rbtree.h | ||
screen_info.h | ||
serial_reg.h | ||
sizes.h | ||
stat.h | ||
stddef.h | ||
string.h | ||
stringify.h | ||
time.h | ||
typecheck.h | ||
types.h | ||
utf.h | ||
xxhash.h | ||
zstd_errors.h | ||
zstd_lib.h | ||
zstd.h |