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

Commit ff2341aa authored by Mukesh Ojha's avatar Mukesh Ojha Committed by Gerrit - the friendly Code Review server
Browse files

cpuhotplug: fix cleanup issue in hotplug fail path



While we hotplug a CPU if any one of the callback (which is to be
called after notify_online) fails, while doing rollback notify_dead()
has not being called, as for step `notify:prepare` the flag
`skipone_err` set to true and due to which sysfs nodes don't
get released.

If we call notify_dead(), it will send CPU_DEAD notification to the
drivers and they could do their cleanup. So, there is no need to send
CPU_UP_CANCEL notification on hotplug failure. This eventually
reverts commit 5ec3ec14 ("kernel: cpu: send CPU_UP_CANCELLED
notifcation").

Change-Id: I4ba42becec25a9d92acccae28a9fc28b9d9dedc1
Signed-off-by: default avatarMukesh Ojha <mojha@codeaurora.org>
parent 5326a970
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -521,7 +521,6 @@ static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
		if (ret) {
			st->target = prev_state;
			undo_cpu_up(cpu, st);
			cpu_notify(CPU_UP_CANCELED, cpu);
			break;
		}
	}
@@ -1381,7 +1380,6 @@ static struct cpuhp_step cpuhp_bp_states[] = {
		.name			= "notify:prepare",
		.startup.single		= notify_prepare,
		.teardown.single	= notify_dead,
		.skip_onerr		= true,
		.cant_stop		= true,
	},
	/*
@@ -1487,7 +1485,6 @@ static struct cpuhp_step cpuhp_ap_states[] = {
		.name			= "notify:online",
		.startup.single		= notify_online,
		.teardown.single	= notify_down_prepare,
		.skip_onerr		= true,
	},
#endif
	/*