linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Levi Yun <ppbuk5246@gmail.com>
To: james.morse@arm.com, pierre.gondois@arm.com
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Levi Yun <ppbuk5246@gmail.com>
Subject: [PATCH v3] firmware/arm_sdei: Fix invalid argument to unregister private events.
Date: Thu, 18 Jan 2024 20:20:54 +0000	[thread overview]
Message-ID: <20240118202054.81795-1-ppbuk5246@gmail.com> (raw)
In-Reply-To: <20240118201514.81046-1-ppbuk5246@gmail.com>

To unregister private events in device freeze, it should call
cpuhp_remove_state with sdei_hp_state not sdei_entry_point.
otherwise, it seems to fail on cpuhp_cb_check.

Signed-off-by: Levi Yun <ppbuk5246@gmail.com>
Fixes: d2c48b2387eb ("firmware: arm_sdei: Fix sleep from invalid context BUG")
Reviewed-by: James Morse <james.morse@arm.com>
---
Changes:
    v1->v2: add fixes tag and resetting sdei_hp_state
   v2->v3: add missing resetting sdei_hp_state.

 drivers/firmware/arm_sdei.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index 285fe7ad490d..973972d50287 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -763,7 +763,9 @@ static int sdei_device_freeze(struct device *dev)
 	int err;

 	/* unregister private events */
-	cpuhp_remove_state(sdei_entry_point);
+	cpuhp_remove_state(sdei_hp_state);
+
+	sdei_hp_state = 0;

 	err = sdei_unregister_shared();
 	if (err)
--
2.41.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2024-01-18 20:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10  9:01 [PATCH] firmware/arm_sdei: Fix invalid argument to unregister private events Levi Yun
2024-01-15 13:01 ` Pierre Gondois
2024-01-15 17:24   ` James Morse
2024-01-17 12:34     ` Yun Levi
2024-01-18 14:14       ` Yun Levi
2024-01-18 20:15     ` [PATCH v2] " Levi Yun
2024-01-18 20:20       ` Levi Yun [this message]

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=20240118202054.81795-1-ppbuk5246@gmail.com \
    --to=ppbuk5246@gmail.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre.gondois@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).