summaryrefslogtreecommitdiff
path: root/include/linux/zstd_errors.h
diff options
context:
space:
mode:
authorStephan Gerhold <[email protected]>2025-04-07 16:59:37 +0200
committerMattijs Korpershoek <[email protected]>2025-04-23 09:50:52 +0200
commit59310d1ecb9f56a1bac405a5edfa9774f2d90220 (patch)
treee6d2f5a5eb36094c1f2af81f113bcb25bbd93559 /include/linux/zstd_errors.h
parent22b5aad20ae0f17bd9617fb9c10ddb38d2b91920 (diff)
usb: gadget: introduce 'enabled' flag in struct usb_ep
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 <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'include/linux/zstd_errors.h')
0 files changed, 0 insertions, 0 deletions