android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Albert Briscoe 9fe0a8c069 usb: gadget: function: fix dangling pnp_string in f_printer.c
[ Upstream commit 24b7ba2f88e04800b54d462f376512e8c41b8a3c ]

When opts->pnp_string is changed with configfs, new memory is allocated for
the string. It does not, however, update dev->pnp_string, even though the
memory is freed. When rquesting the string, the host then gets old or
corrupted data rather than the new string. The ieee 1284 id string should
be allowed to change while the device is connected.

The bug was introduced in commit fdc01cc286 ("usb: gadget: printer:
Remove pnp_string static buffer"), which changed opts->pnp_string from a
char[] to a char*.
This patch changes dev->pnp_string from a char* to a char** pointing to
opts->pnp_string.

Fixes: fdc01cc286 ("usb: gadget: printer: Remove pnp_string static buffer")
Signed-off-by: Albert Briscoe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2022-10-26 13:22:39 +02:00
..
atm
c67x00
cdns3 usb: cdns3: fix issue with rearming ISO OUT endpoint 2022-09-28 11:04:02 +02:00
chipidea usb: chipidea: udc: check request status before setting device address 2022-06-29 08:58:47 +02:00
class USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) 2022-09-15 12:04:52 +02:00
common
core usb: add quirks for Lenovo OneLink+ Dock 2022-10-26 13:22:12 +02:00
dwc2 usb: dwc2: fix wrong order of phy_power_on and phy_init 2022-09-15 12:04:52 +02:00
dwc3 usb: dwc3: gadget: Avoid duplicate requests to enable Run/Stop 2022-09-28 11:04:00 +02:00
early
gadget usb: gadget: function: fix dangling pnp_string in f_printer.c 2022-10-26 13:22:39 +02:00
host xhci: Don't show warning for reinit on known broken suspend 2022-10-26 13:22:39 +02:00
image
isp1760
misc usb: misc: fix improper handling of refcount in uss720_probe() 2022-05-09 09:03:21 +02:00
mon usb: mon: make mmapped memory read only 2022-10-15 07:54:38 +02:00
mtu3
musb usb: musb: Fix missing of_node_put() in omap2430_probe 2022-06-14 18:11:51 +02:00
phy
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-08-25 11:18:33 +02:00
roles
serial USB: serial: qcserial: add new usb-id for Dell branded EM7455 2022-10-15 07:54:39 +02:00
storage uas: ignore UAS for Thinkplus chips 2022-10-05 10:37:42 +02:00
typec usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles 2022-09-15 12:04:52 +02:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:11:51 +02:00
Kconfig
Makefile
usb-skeleton.c