public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Channagoud Kadabi <ckadabi@codeaurora.org>
To: gregkh@linuxfoundation.org, tglx@linuxtronix.de
Cc: Channagoud Kadabi <ckadabi@codeaurora.org>,
	rusty@rustcorp.com.au, tj@kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH] kernel: cpu: send CPU_UP_CANCELLED notification
Date: Fri, 14 Jul 2017 14:50:28 -0700	[thread overview]
Message-ID: <1500069028-24269-1-git-send-email-ckadabi@codeaurora.org> (raw)

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

             reply	other threads:[~2017-07-14 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 21:50 Channagoud Kadabi [this message]
2017-07-15  6:38 ` [PATCH] kernel: cpu: send CPU_UP_CANCELLED notification Greg KH
2017-07-15  8:03 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500069028-24269-1-git-send-email-ckadabi@codeaurora.org \
    --to=ckadabi@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linuxtronix.de \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox