Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0aabb4b5 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Gerrit - the friendly Code Review server
Browse files

coresight: fix the mutex deadlock issue in cpu hotplug path



The CPU hotplug notification path is called up by holding the
cpu_add_remove_lock and when the same is held by the
unregister_hotcpu_notifier() in the notifier path results in
deadlock.So, release and acquire the cpu_add_remove_lock before and
after unregistration of cpu notifiers.

Change-Id: I46d6b2ae98dc1eae7c55f8ac62325d25b48d463f
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent c44279d0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3483,8 +3483,12 @@ out:
	return NOTIFY_OK;
err1:
	if (--count == 0) {
		/* Release the cpu_add_remove_lock */
		cpu_maps_update_done();
		unregister_hotcpu_notifier(&etm_cpu_notifier);
		unregister_hotcpu_notifier(&etm_cpu_dying_notifier);
		/* Set to the original state of lock */
		cpu_maps_update_begin();
	}
	if (clk_disable[cpu]) {
		clk_disable_unprepare(etmdrvdata[cpu]->clk);