summaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>2012-06-01 14:49:50 +0530
committerOleg Nesterov <oleg@redhat.com>2012-08-28 18:21:15 +0200
commit61e1d394984110e2e76f25572d5b1b5d48796751 (patch)
treee189b458a639d23986c0ebe0f2c52879b2a324a3 /kernel/events
parent508dc4f8eece1a70c493afc6511fdf5934fef567 (diff)
downloadtalos-op-linux-61e1d394984110e2e76f25572d5b1b5d48796751.tar.gz
talos-op-linux-61e1d394984110e2e76f25572d5b1b5d48796751.zip
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 <srikar@linux.vnet.ibm.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/uprobes.c2
1 files changed, 0 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud