commit | a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Wed Nov 30 22:21:05 2016 +0300 |
committer | Radim Krčmář <rkrcmar@redhat.com> | Thu Dec 01 16:10:50 2016 +0100 |
tree | 50974c8b8a1564bd35353043f3202510f7cec4de | |
parent | 0f4828a1da3342be81e812b28fbcf29261146d25 [diff] |
KVM: use after free in kvm_ioctl_create_device() We should move the ops->destroy(dev) after the list_del(&dev->vm_node) so that we don't use "dev" after freeing it. Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>