mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yunseong Kim <ysk@kzalloc.com>
To: Russell King <linux@armlinux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Yunseong Kim <ysk@kzalloc.com>
Subject: [PATCH] arm/probes/uprobes: Remove redundant preempt_disable/enable around kmap_atomic
Date: Sun, 15 Jun 2025 14:11:30 +0000	[thread overview]
Message-ID: <20250615141129.653384-2-ysk@kzalloc.com> (raw)

The 'kmap_atomic' API implicitly disables preemption for the duration
of its use. It merely cleans up the code by removing unnecessary
operations, making it clearer and efficient.

Signed-off-by: Yunseong Kim <ysk@kzalloc.com>
---
 arch/arm/probes/uprobes/core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/probes/uprobes/core.c b/arch/arm/probes/uprobes/core.c
index 885e0c5e8c20..ebd17af0d865 100644
--- a/arch/arm/probes/uprobes/core.c
+++ b/arch/arm/probes/uprobes/core.c
@@ -116,16 +116,12 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
 	void *xol_page_kaddr = kmap_atomic(page);
 	void *dst = xol_page_kaddr + (vaddr & ~PAGE_MASK);
 
-	preempt_disable();
-
 	/* Initialize the slot */
 	memcpy(dst, src, len);
 
 	/* flush caches (dcache/icache) */
 	flush_uprobe_xol_access(page, vaddr, dst, len);
 
-	preempt_enable();
-
 	kunmap_atomic(xol_page_kaddr);
 }
 
-- 
2.48.1


                 reply	other threads:[~2025-06-15 14:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250615141129.653384-2-ysk@kzalloc.com \
    --to=ysk@kzalloc.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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®