Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320481
b: refs/heads/master
c: 194f8dc
h: refs/heads/master
i:
  320479: 759b15d
v: v3
  • Loading branch information
Oleg Nesterov authored and Ingo Molnar committed Jul 30, 2012
1 parent 04066ca commit bfdf7a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 57683f72b8c01c53c85fe13e82fe1feb3a06bcd5
refs/heads/master: 194f8dcbe9629d8e9346cf96345a9c0bbf0e67ae
8 changes: 6 additions & 2 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/swap.h> /* try_to_free_swap */
#include <linux/ptrace.h> /* user_enable_single_step */
#include <linux/kdebug.h> /* notifier mechanism */
#include "../../mm/internal.h" /* munlock_vma_page */

#include <linux/uprobes.h>

Expand Down Expand Up @@ -141,7 +142,7 @@ static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
pte_t *ptep;
int err;

/* freeze PageSwapCache() for try_to_free_swap() below */
/* For try_to_free_swap() and munlock_vma_page() below */
lock_page(page);

err = -EAGAIN;
Expand All @@ -164,9 +165,12 @@ static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
page_remove_rmap(page);
if (!page_mapped(page))
try_to_free_swap(page);
put_page(page);
pte_unmap_unlock(ptep, ptl);

if (vma->vm_flags & VM_LOCKED)
munlock_vma_page(page);
put_page(page);

err = 0;
unlock:
unlock_page(page);
Expand Down

0 comments on commit bfdf7a7

Please sign in to comment.