]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: ucsi: Fix NULL pointer access
authorAndrei Kuchynski <akuchynski@chromium.org>
Wed, 5 Mar 2025 11:17:39 +0000 (11:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Apr 2025 08:05:46 +0000 (10:05 +0200)
commit7a735a8a46f6ebf898bbefd96659ca5da798bce0
treec2e5b3ded623a284cc1441350511f4b8bcd11e71
parent03fa71e97e9bb116993ec1d51b8a6fe776db0984
usb: typec: ucsi: Fix NULL pointer access

commit b13abcb7ddd8d38de769486db5bd917537b32ab1 upstream.

Resources should be released only after all threads that utilize them
have been destroyed.
This commit ensures that resources are not released prematurely by waiting
for the associated workqueue to complete before deallocating them.

Cc: stable <stable@kernel.org>
Fixes: b9aa02ca39a4 ("usb: typec: ucsi: Add polling mechanism for partner tasks like alt mode checking")
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250305111739.1489003-2-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c