Skip to content
Commit fdd897e6 authored by Mark McLoughlin's avatar Mark McLoughlin Committed by Avi Kivity
Browse files

KVM: make kvm_unregister_irq_ack_notifier() safe



We never pass a NULL notifier pointer here, but we may well
pass a notifier struct which hasn't previously been
registered.

Guard against this by using hlist_del_init() which will
not do anything if the node hasn't been added to the list
and, when removing the node, will ensure that a subsequent
call to hlist_del_init() will be fine too.

Fixes an oops seen when an assigned device is freed before
and IRQ is assigned to it.

Signed-off-by: default avatarMark McLoughlin <markmc@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 844c7a9f
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