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

Commit ec8cda53 authored by Prasad Sodagudi's avatar Prasad Sodagudi
Browse files

sched: Take irq_sparse lock during the isolation



irq_migrate_all_off_this_cpu() is used to migrate IRQs and this
function checks for all active irq in the allocated_irqs mask.
irq_migrate_all_off_this_cpu() expects the caller to take irq_sparse
lock to avoid race conditions while accessing allocated_irqs
mask variable. Prevent a race between irq alloc/free and irq
migration by adding irq_sparse lock across CPU isolation.

Change-Id: I9edece1ecea45297c8f6529952d88b3133046467
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent e415ce16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6134,7 +6134,9 @@ int sched_isolate_cpu(int cpu)
	smp_call_function_any(&avail_cpus, timer_quiesce_cpu, &cpu, 1);

	watchdog_disable(cpu);
	irq_lock_sparse();
	stop_cpus(cpumask_of(cpu), do_isolation_work_cpu_stop, 0);
	irq_unlock_sparse();

	calc_load_migrate(rq);
	update_max_interval();