summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-10 20:03:30 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-10 20:03:30 +0100
commit1abaf3326bf2a2fabd6a0b6258e9cb33d734050a (patch)
treedd51de5b7036139c6c17f27cbae8b259bebdeb75 /arch
parentMerge branch 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentx86 mmiotrace: fix remove_kmmio_fault_pages() (diff)
downloadlinux-1abaf3326bf2a2fabd6a0b6258e9cb33d734050a.tar.xz
linux-1abaf3326bf2a2fabd6a0b6258e9cb33d734050a.zip
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86 mmiotrace: fix remove_kmmio_fault_pages()
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/kmmio.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 9f205030d9aa..6a518dd08a36 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -451,23 +451,24 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head)
static void remove_kmmio_fault_pages(struct rcu_head *head)
{
- struct kmmio_delayed_release *dr = container_of(
- head,
- struct kmmio_delayed_release,
- rcu);
+ struct kmmio_delayed_release *dr =
+ container_of(head, struct kmmio_delayed_release, rcu);
struct kmmio_fault_page *p = dr->release_list;
struct kmmio_fault_page **prevp = &dr->release_list;
unsigned long flags;
+
spin_lock_irqsave(&kmmio_lock, flags);
while (p) {
- if (!p->count)
+ if (!p->count) {
list_del_rcu(&p->list);
- else
+ prevp = &p->release_next;
+ } else {
*prevp = p->release_next;
- prevp = &p->release_next;
+ }
p = p->release_next;
}
spin_unlock_irqrestore(&kmmio_lock, flags);
+
/* This is the real RCU destroy call. */
call_rcu(&dr->rcu, rcu_free_kmmio_fault_pages);
}