Skip to contentSkip to conversation

arm/probes/uprobes: Remove redundant preempt_disable/enable around kmap_atomic

PATCH New Yunseong Kim 1 participant 1 message Jun 15, 2025 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/probes/uprobes: Remove redundant preempt_disable/enable around kmap_atomic

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.

---
 arch/arm/probes/uprobes/core.c | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/probes/uprobes/core.c +0 -4
index 885e0c5e8c20..ebd17af0d865 100644
@@ -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);
 }
 
Signature · 1 line
2.48.1