Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320469
b: refs/heads/master
c: c517ee7
h: refs/heads/master
i:
  320467: eedacdd
v: v3
  • Loading branch information
Oleg Nesterov authored and Ingo Molnar committed Jul 30, 2012
1 parent 5bc56c7 commit 2ec3735
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f403072c6108e15f319a4a5036b650c77760522c
refs/heads/master: c517ee744b96e441d9c731e245f83c6d08dc0a19
11 changes: 4 additions & 7 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,19 @@ static loff_t vma_address(struct vm_area_struct *vma, loff_t offset)
* based on replace_page in mm/ksm.c
*
* @vma: vma that holds the pte pointing to page
* @addr: address the old @page is mapped at
* @page: the cowed page we are replacing by kpage
* @kpage: the modified page we replace page by
*
* Returns 0 on success, -EFAULT on failure.
*/
static int __replace_page(struct vm_area_struct *vma, struct page *page, struct page *kpage)
static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
struct page *page, struct page *kpage)
{
struct mm_struct *mm = vma->vm_mm;
unsigned long addr;
spinlock_t *ptl;
pte_t *ptep;

addr = page_address_in_vma(page, vma);
if (addr == -EFAULT)
return -EFAULT;

ptep = page_check_address(page, mm, addr, &ptl, 0);
if (!ptep)
return -EAGAIN;
Expand Down Expand Up @@ -243,7 +240,7 @@ static int write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
goto unlock_out;

lock_page(new_page);
ret = __replace_page(vma, old_page, new_page);
ret = __replace_page(vma, vaddr, old_page, new_page);
unlock_page(new_page);

unlock_out:
Expand Down

0 comments on commit 2ec3735

Please sign in to comment.