public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: cpu: send CPU_UP_CANCELLED notification
@ 2017-07-14 21:50 Channagoud Kadabi
  2017-07-15  6:38 ` Greg KH
  2017-07-15  8:03 ` kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Channagoud Kadabi @ 2017-07-14 21:50 UTC (permalink / raw)
  To: gregkh, tglx; +Cc: Channagoud Kadabi, rusty, tj, akpm, linux-kernel, stable

If any of the callbacks during cpu up fail undo_cpu_up calls the
teardown call backs to rollback states but does not send
CPU_UP_CANCELLED. As on 4.9 kernel some drivers still use the
notification mechanism for cpu hotplug we need to send
CPU_UP_CANCELLED notification so drivers can rollback whatever
they did during cpu up.

Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
---
 kernel/cpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 8f52977..ade5bb2 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -494,6 +494,7 @@ 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;
 		}
 	}
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-15  8:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 21:50 [PATCH] kernel: cpu: send CPU_UP_CANCELLED notification Channagoud Kadabi
2017-07-15  6:38 ` Greg KH
2017-07-15  8:03 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox