mirror-linux/drivers/usb/core
Greg Kroah-Hartman c68ece7baf USB: fix memory leak with using debugfs_lookup()
[ Upstream commit 30374434ed ]

When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time.  To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic at
once.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
Link: https://lore.kernel.org/r/20230106152828.3790902-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:55:34 +01:00
..
Kconfig
Makefile
buffer.c
config.c
devices.c
devio.c
driver.c
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c
hub.c USB: core: Don't hold device lock while reading the "descriptors" sysfs file 2023-03-03 11:52:25 +01:00
hub.h
ledtrig-usbport.c
message.c
notify.c
of.c
otg_productlist.h
phy.c
phy.h
port.c
quirks.c usb: core: add quirk for Alcor Link AK9563 smartcard reader 2023-02-14 19:11:52 +01:00
sysfs.c USB: core: Don't hold device lock while reading the "descriptors" sysfs file 2023-03-03 11:52:25 +01:00
urb.c
usb-acpi.c
usb.c USB: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:34 +01:00
usb.h