mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
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>
This commit is contained in:
parent
508dc4f8ee
commit
61e1d39498
1 changed files with 0 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue