usb: typec: ucsi: Fix a deadlock in ucsi_send_command_common()
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 6 Aug 2024 11:20:29 +0000 (14:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Aug 2024 10:48:30 +0000 (12:48 +0200)
commit65ba8cef0416816b912c04850fc2468329994353
tree94a9c958eb50d35d6fa2636677acd8744b83641d
parentbecac61a771a4a127e0c38c28110a55cb84d9f41
usb: typec: ucsi: Fix a deadlock in ucsi_send_command_common()

The function returns with the ppm_lock held if the PPM is
busy or there's an error.

Reported-and-tested-by: Luciano Coelho <luciano.coelho@intel.com>
Fixes: 5e9c1662a89b ("usb: typec: ucsi: rework command execution functions")
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reported-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20240806112029.2984319-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c