linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm/probes/uprobes: Remove redundant preempt_disable/enable around kmap_atomic
@ 2025-06-15 14:11 Yunseong Kim
  0 siblings, 0 replies; only message in thread
From: Yunseong Kim @ 2025-06-15 14:11 UTC (permalink / raw)
  To: Russell King, Andrew Morton, Oleg Nesterov, David Hildenbrand,
	Peter Zijlstra (Intel)
  Cc: linux-arm-kernel, linux-kernel, Yunseong Kim

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-15 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15 14:11 [PATCH] arm/probes/uprobes: Remove redundant preempt_disable/enable around kmap_atomic Yunseong Kim

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).