Skip to content
Commit 12119151 authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Greg Kroah-Hartman
Browse files

greybus: timesync: Enforce TimeSync locks as subordinate to Interface locks



gb_timesync_svc_teardown() is called from gb_timesync_svc_del() and issues a
command to a remote Interface to switch off its timers. The lock ordering
is TimeSync => Interface in this case. However gb_module_del() takes an
Interface lock then calls gb_interface_del() => gb_timesync_svc_del() in
this case the lock ordering is Interface => TimeSync.

This patch fixes by removing the taking of the Interface mutex in
gb_interface_timesync_do_something(). If an Interface is present in the
TimeSync linked-list - it is by definition intf->enabled.

Reported-by: default avatarRui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 5e2b6391
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment