Commit b1c28b84 authored by yuan linyu's avatar yuan linyu Committed by Cheng Yu
Browse files

usb: udc: remove warning when queue disabled ep

stable inclusion
from stable-v5.10.215
commit 3e944ddc17c042945d983e006df7860687a8849a
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q98P
CVE: CVE-2024-35822

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3e944ddc17c042945d983e006df7860687a8849a



--------------------------------

commit 2a587a035214fa1b5ef598aea0b81848c5b72e5e upstream.

It is possible trigger below warning message from mass storage function,

WARNING: CPU: 6 PID: 3839 at drivers/usb/gadget/udc/core.c:294 usb_ep_queue+0x7c/0x104
pc : usb_ep_queue+0x7c/0x104
lr : fsg_main_thread+0x494/0x1b3c

Root cause is mass storage function try to queue request from main thread,
but other thread may already disable ep when function disable.

As there is no function failure in the driver, in order to avoid effort
to fix warning, change WARN_ON_ONCE() in usb_ep_queue() to pr_debug().

Suggested-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
Signed-off-by: default avataryuan linyu <yuanlinyu@hihonor.com>
Reviewed-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20240315020144.2715575-1-yuanlinyu@hihonor.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarCheng Yu <serein.chengyu@huawei.com>
parent 5dac66de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment