diff options
author | Hans de Goede <[email protected]> | 2020-08-09 16:19:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-08-18 12:07:42 +0200 |
commit | 7e90057f125c8c852940b848e06e7a72f050fc6f (patch) | |
tree | b5ce6af320ad5ea82f67b76d4fef7ccf470a7923 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 0ff0705a2ef2929e9326c95df48bdbebb0dafaad (diff) |
usb: typec: ucsi: Fix 2 unlocked ucsi_run_command calls
Fix 2 unlocked ucsi_run_command calls:
1. ucsi_handle_connector_change() contains one ucsi_send_command() call,
which takes the ppm_lock for it; and one ucsi_run_command() call which
relies on the caller have taking the ppm_lock.
ucsi_handle_connector_change() does not take the lock, so the
second (ucsi_run_command) calls should also be ucsi_send_command().
2. ucsi_get_pdos() gets called from ucsi_handle_connector_change() which
does not hold the ppm_lock, so it also must use ucsi_send_command().
This commit also adds a WARN_ON(!mutex_is_locked(&ucsi->ppm_lock)); to
ucsi_run_command() to avoid similar problems getting re-introduced in
the future.
Cc: [email protected]
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions