diff options
author | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 2012-06-01 05:19:50 -0400 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-08-28 12:21:15 -0400 |
commit | 61e1d394984110e2e76f25572d5b1b5d48796751 (patch) | |
tree | e189b458a639d23986c0ebe0f2c52879b2a324a3 /kernel/events | |
parent | 508dc4f8eece1a70c493afc6511fdf5934fef567 (diff) |
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.c | 2 |
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_ | |||
280 | if (ret <= 0) | 280 | if (ret <= 0) |
281 | return ret; | 281 | return ret; |
282 | 282 | ||
283 | lock_page(page); | ||
284 | vaddr_new = kmap_atomic(page); | 283 | vaddr_new = kmap_atomic(page); |
285 | vaddr &= ~PAGE_MASK; | 284 | vaddr &= ~PAGE_MASK; |
286 | memcpy(opcode, vaddr_new + vaddr, UPROBE_SWBP_INSN_SIZE); | 285 | memcpy(opcode, vaddr_new + vaddr, UPROBE_SWBP_INSN_SIZE); |
287 | kunmap_atomic(vaddr_new); | 286 | kunmap_atomic(vaddr_new); |
288 | unlock_page(page); | ||
289 | 287 | ||
290 | put_page(page); | 288 | put_page(page); |
291 | 289 | ||