Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132006
b: refs/heads/master
c: 340430c
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Paalanen authored and Ingo Molnar committed Mar 2, 2009
1 parent ec08b70 commit 27e592e
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 3e39aa156a24ce386da378784edd0f748c770087
refs/heads/master: 340430c572f7b2b275d39965e88bafa71693cb23
9 changes: 7 additions & 2 deletions trunk/arch/x86/mm/kmmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ struct kmmio_fault_page {
/*
* Number of times this page has been registered as a part
* of a probe. If zero, page is disarmed and this may be freed.
* Used only by writers (RCU).
* Used only by writers (RCU) and post_kmmio_handler().
* Protected by kmmio_lock, when linked into kmmio_page_table.
*/
int count;
};
Expand Down Expand Up @@ -317,7 +318,11 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
if (ctx->probe && ctx->probe->post_handler)
ctx->probe->post_handler(ctx->probe, condition, regs);

arm_kmmio_fault_page(ctx->fpage);
/* Prevent racing against release_kmmio_fault_page(). */
spin_lock(&kmmio_lock);
if (ctx->fpage->count)
arm_kmmio_fault_page(ctx->fpage);
spin_unlock(&kmmio_lock);

regs->flags &= ~X86_EFLAGS_TF;
regs->flags |= ctx->saved_flags;
Expand Down

0 comments on commit 27e592e

Please sign in to comment.