WSL2-Linux-Kernel/drivers/usb/gadget/function
Konstantin Aladyshev 86240d91ec usb: gadget: f_hid: fix report descriptor allocation
commit 61890dc28f7d9e9aac8a9471302613824c22fae4 upstream.

The commit 89ff3dfac6 ("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: 89ff3dfac6 ("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>
2023-12-13 18:36:48 +01:00
..
Makefile
f_acm.c
f_ecm.c
f_eem.c
f_fs.c usb: gadget: f_fs: Add unbind event before functionfs_unbind 2023-06-09 10:32:29 +02:00
f_hid.c usb: gadget: f_hid: fix report descriptor allocation 2023-12-13 18:36:48 +01:00
f_loopback.c
f_mass_storage.c USB: gadget: f_mass_storage: Fix unused variable warning 2023-09-19 12:22:46 +02:00
f_mass_storage.h
f_midi.c
f_ncm.c usb: gadget: f_ncm: Always set current gadget in ncm_bind() 2023-11-28 16:56:19 +00:00
f_obex.c
f_phonet.c
f_printer.c
f_rndis.c
f_serial.c
f_sourcesink.c
f_subset.c
f_tcm.c
f_uac1.c
f_uac1_legacy.c
f_uac2.c usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints 2023-02-09 11:26:44 +01:00
f_uvc.c
f_uvc.h
g_zero.h
ndis.h
rndis.c
rndis.h
storage_common.c
storage_common.h
tcm.h
u_audio.c usb: gadget: u_audio: don't let userspace block driver unbind 2023-03-30 12:47:55 +02:00
u_audio.h
u_ecm.h
u_eem.h
u_ether.c usb: gadget: u_ether: Fix host MAC address case 2023-05-24 17:36:52 +01:00
u_ether.h
u_ether_configfs.h
u_fs.h
u_gether.h
u_hid.h
u_midi.h
u_ncm.h
u_phonet.h
u_printer.h
u_rndis.h
u_serial.c usb: gadget: u_serial: Avoid spinlock recursion in __gs_console_push 2023-08-26 14:23:23 +02:00
u_serial.h
u_tcm.h
u_uac1.h
u_uac1_legacy.c
u_uac1_legacy.h
u_uac2.h
u_uvc.h
uvc.h
uvc_configfs.c usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails 2023-03-11 13:57:40 +01:00
uvc_configfs.h
uvc_queue.c
uvc_queue.h
uvc_v4l2.c
uvc_v4l2.h
uvc_video.c
uvc_video.h