projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
508dc4f
)
uprobes: Remove redundant lock_page/unlock_page
author
Srikar Dronamraju
<srikar@linux.vnet.ibm.com>
Fri, 1 Jun 2012 09:19:50 +0000
(14:49 +0530)
committer
Oleg Nesterov
<oleg@redhat.com>
Tue, 28 Aug 2012 16:21:15 +0000
(18:21 +0200)
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>
kernel/events/uprobes.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/events/uprobes.c
b/kernel/events/uprobes.c
index c08a22d02f7268ffd5e5516fb9d67182d22e5de8..7cff24c60dd7107a335ed8db637dafb154c66d18 100644
(file)
--- 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);