kernel_samsung_a53x/drivers/usb/gadget/function
Konstantin Aladyshev d04574d2d2 usb: gadget: f_hid: fix report descriptor allocation
commit 61890dc28f7d9e9aac8a9471302613824c22fae4 upstream.

The commit 89ff3dfac604 ("usb: gadget: f_hid: fix f_hidg lifetime vs
cdev") has introduced a bug that leads to hid device corruption after
the replug operation.
Reverse device managed memory allocation for the report descriptor
to fix the issue.

Tested:
This change was tested on the AMD EthanolX CRB server with the BMC
based on the OpenBMC distribution. The BMC provides KVM functionality
via the USB gadget device:
- before: KVM page refresh results in a broken USB device,
- after: KVM page refresh works without any issues.

Fixes: 89ff3dfac604 ("usb: gadget: f_hid: fix f_hidg lifetime vs cdev")
Cc: stable@vger.kernel.org
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Link: https://lore.kernel.org/r/20231206080744.253-2-aladyshev22@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:11:45 +01:00
..
f_accessory.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_acm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_audio_source.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_conn_gadget.c Fix clang 16 errors treewide 2024-06-15 16:28:48 -03:00
f_conn_gadget.ioctl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_dm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_dm1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_ecm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_eem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_fs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_hid.c usb: gadget: f_hid: fix report descriptor allocation 2024-11-18 12:11:45 +01:00
f_loopback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_mass_storage.c usb: correct function name 2024-11-17 17:43:41 +01:00
f_mass_storage.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_midi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_ncm.c usb: gadget: f_ncm: Always set current gadget in ncm_bind() 2024-11-18 11:43:14 +01:00
f_obex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_phonet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_printer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_rndis.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_sourcesink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_ss_mon_gadget.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_subset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_tcm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_uac1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_uac1_legacy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_uac2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_uts.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_uvc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f_uvc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
g_zero.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ndis.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rndis.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rndis.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
storage_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
storage_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_audio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_audio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_ecm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_eem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_ether.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_ether.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_ether_configfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_fs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_gether.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_hid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_midi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_ncm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_phonet.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_printer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_rndis.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_serial.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_tcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_uac1.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_uac1_legacy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_uac1_legacy.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_uac2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_uvc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uac_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_configfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_queue.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_queue.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_v4l2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_v4l2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_video.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uvc_video.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00