Bryan O'Donoghue c9e8f893ee greybus: timesync: Do not hold mutex on cancel_delayed_work_sync
There is a scenario where gb_timesync_svc_remove() can run, attain a mutex
and call cancel_delayed_work_sync(). In the meantime a worker may already
be running and trying to attain the same mutex but will never do so as the
gb_timesync_svc_remove() path is holding the mutex and waiting on the
delayed_work_sync() to complete - leading to deadlock. This patch addresses
by calling the cancel_delayed_work_sync() before locking the relevant
mutex.

Reported-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Tested-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-06-16 09:07:41 -07:00
..
2016-02-02 21:26:32 -08:00
2016-06-10 16:32:33 -07:00
2016-06-03 17:03:23 -07:00
2016-06-03 17:03:23 -07:00
2016-06-10 16:32:33 -07:00
2016-06-10 16:32:33 -07:00
2014-08-11 15:29:23 +08:00
2016-05-27 11:28:16 -07:00
2016-04-25 11:08:30 -07:00
2016-06-10 16:32:33 -07:00
2016-06-10 16:32:33 -07:00
2016-06-10 16:32:33 -07:00

Greybus kernel code

To build against the running kernel (odds are you don't want this):
	make

To build against a specific kernel source tree (odds are you want this):
	KERNELDIR=/home/some/random/place make

Any questions / concerns about this code base, please email:
	Greg Kroah-Hartman <greg@kroah.com>