Commit ec27386d authored by Andrei Kuchynski's avatar Andrei Kuchynski Committed by Greg Kroah-Hartman
Browse files

usb: typec: class: Fix NULL pointer access



Concurrent calls to typec_partner_unlink_device can lead to a NULL pointer
dereference. This patch adds a mutex to protect USB device pointers and
prevent this issue. The same mutex protects both the device pointers and
the partner device registration.

Cc: stable@vger.kernel.org
Fixes: 59de2a56 ("usb: typec: Link enumerated USB devices with Type-C partner")
Signed-off-by: default avatarAndrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: default avatarBenson Leung <bleung@chromium.org>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250321143728.4092417-2-akuchynski@chromium.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bea5892d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment