Re: [PATCH] KVM: Prevent double-free on HPT resize commit path

2017-02-27 Thread Paul Mackerras
On Tue, Feb 28, 2017 at 11:56:55AM +1100, David Gibson wrote: > On Wed, Feb 15, 2017 at 02:40:04PM +1100, David Gibson wrote: > > resize_hpt_release(), called once the HPT resize of a KVM guest is > > completed (successfully or unsuccessfully) free()s the state structure for > > the resize. It is

Re: [PATCH] KVM: Prevent double-free on HPT resize commit path

2017-02-27 Thread David Gibson
On Wed, Feb 15, 2017 at 02:40:04PM +1100, David Gibson wrote: > resize_hpt_release(), called once the HPT resize of a KVM guest is > completed (successfully or unsuccessfully) free()s the state structure for > the resize. It is currently not safe to call with a NULL pointer. > > However, one of t

[PATCH] KVM: Prevent double-free on HPT resize commit path

2017-02-14 Thread David Gibson
resize_hpt_release(), called once the HPT resize of a KVM guest is completed (successfully or unsuccessfully) free()s the state structure for the resize. It is currently not safe to call with a NULL pointer. However, one of the error paths in kvm_vm_ioctl_resize_hpt_commit() can invoke it with a