Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757296Ab2EaLwd (ORCPT ); Thu, 31 May 2012 07:52:33 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:56309 "EHLO e23smtp09.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753494Ab2EaLwb (ORCPT ); Thu, 31 May 2012 07:52:31 -0400 From: Srikar Dronamraju To: Peter Zijlstra , Ingo Molnar Cc: Linus Torvalds , Ananth N Mavinakayanahalli , LKML , Oleg Nesterov , Steven Rostedt , Arnaldo Carvalho de Melo , Masami Hiramatsu , Anton Arapov Date: Thu, 31 May 2012 17:16:30 +0530 Message-Id: <20120531114630.23691.33166.sendpatchset@srdronam.in.ibm.com> Subject: [PATCH 1/3] uprobes/core: Remove redundant lock_page/unlock_page x-cbid: 12053102-3568-0000-0000-000001E7C02D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1014 Lines: 33 From: Srikar Dronamraju No need to lock the page when copying the opcode in read_opcode(). Signed-off-by: Srikar Dronamraju --- kernel/events/uprobes.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 42b21eb..b3f3095 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -315,12 +315,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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/