Commit 1abaf332 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-fixes-for-linus' of...

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()
parents a651d799 d0fc63f7
...@@ -451,23 +451,24 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head) ...@@ -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) static void remove_kmmio_fault_pages(struct rcu_head *head)
{ {
struct kmmio_delayed_release *dr = container_of( struct kmmio_delayed_release *dr =
head, container_of(head, struct kmmio_delayed_release, rcu);
struct kmmio_delayed_release,
rcu);
struct kmmio_fault_page *p = dr->release_list; struct kmmio_fault_page *p = dr->release_list;
struct kmmio_fault_page **prevp = &dr->release_list; struct kmmio_fault_page **prevp = &dr->release_list;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&kmmio_lock, flags); spin_lock_irqsave(&kmmio_lock, flags);
while (p) { while (p) {
if (!p->count) if (!p->count) {
list_del_rcu(&p->list); list_del_rcu(&p->list);
else prevp = &p->release_next;
} else {
*prevp = p->release_next; *prevp = p->release_next;
prevp = &p->release_next; }
p = p->release_next; p = p->release_next;
} }
spin_unlock_irqrestore(&kmmio_lock, flags); spin_unlock_irqrestore(&kmmio_lock, flags);
/* This is the real RCU destroy call. */ /* This is the real RCU destroy call. */
call_rcu(&dr->rcu, rcu_free_kmmio_fault_pages); call_rcu(&dr->rcu, rcu_free_kmmio_fault_pages);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment