From: Srikar Dronamraju Date: Fri, 1 Jun 2012 09:19:50 +0000 (+0530) Subject: uprobes: Remove redundant lock_page/unlock_page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=61e1d394984110e2e76f25572d5b1b5d48796751;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git uprobes: Remove redundant lock_page/unlock_page Since read_opcode() reads from the referenced page and doesnt modify the page contents nor the page attributes, there is no need to lock the page. Signed-off-by: Srikar Dronamraju Signed-off-by: Oleg Nesterov --- diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index c08a22d02f72..7cff24c60dd7 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -280,12 +280,10 @@ static int read_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_ if (ret <= 0) return ret; - lock_page(page); vaddr_new = kmap_atomic(page); vaddr &= ~PAGE_MASK; memcpy(opcode, vaddr_new + vaddr, UPROBE_SWBP_INSN_SIZE); kunmap_atomic(vaddr_new); - unlock_page(page); put_page(page);