mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: James Morse <james.morse@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] arm_sdei: remove the set_fs calls in sdei_event_handler
Date: Tue, 14 Apr 2020 16:23:02 +0200	[thread overview]
Message-ID: <20200414142302.448447-3-hch@lst.de> (raw)
In-Reply-To: <20200414142302.448447-1-hch@lst.de>

There are only two callbacks that can be called, which both
eventually end up calling __ghes_sdei_callback.

__ghes_sdei_callback calls irq_work_queue which is a normal
kernel helper called from all kinds of contexts and
ghes_in_nmi_queue_one_entry.  ghes_in_nmi_queue_one_entry is
also called from other code without messing with the address
limit, so it better work without it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/firmware/arm_sdei.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index bdd6461647d7..1c51b378dfca 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -1137,19 +1137,12 @@ int sdei_event_handler(struct pt_regs *regs,
 		       struct sdei_registered_event *arg)
 {
 	int err;
-	mm_segment_t orig_addr_limit;
 	u32 event_num = arg->event_num;
 
-	orig_addr_limit = get_fs();
-	set_fs(USER_DS);
-
 	err = arg->callback(event_num, regs, arg->callback_arg);
 	if (err)
 		pr_err_ratelimited("event %u on CPU %u failed with error: %d\n",
 				   event_num, smp_processor_id(), err);
-
-	set_fs(orig_addr_limit);
-
 	return err;
 }
 NOKPROBE_SYMBOL(sdei_event_handler);
-- 
2.25.1


  parent reply	other threads:[~2020-04-14 14:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 14:23 stop messing with set_fs in arm_sdei Christoph Hellwig
2020-04-14 14:23 ` [PATCH 1/2] firmware: arm_sdei: remove unused interfaces Christoph Hellwig
2020-04-14 14:23 ` Christoph Hellwig [this message]
2020-04-14 15:59 ` stop messing with set_fs in arm_sdei James Morse
2020-04-20 10:22   ` Christoph Hellwig

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=20200414142302.448447-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®