Re: [PATCH] SVM: nSVM: fix resource leak on error path

2020-09-16 Thread Alex Dewar
On Tue, Sep 15, 2020 at 11:15:02AM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 12:07:25PM +0300, Maxim Levitsky wrote: > > I think that this patch is based on unmerged patch, since I don't see > > any memory allocation in nested_svm_vmrun_msrpm, nor out_free label. > > in nether kvm/mas

Re: [PATCH] SVM: nSVM: fix resource leak on error path

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 12:07:25PM +0300, Maxim Levitsky wrote: > I think that this patch is based on unmerged patch, since I don't see > any memory allocation in nested_svm_vmrun_msrpm, nor out_free label. > in nether kvm/master, kvm/queue nor in upstream/master Paolo and I need to figure out fir

Re: [PATCH] SVM: nSVM: fix resource leak on error path

2020-09-15 Thread Maxim Levitsky
On Mon, 2020-09-14 at 20:45 +0100, Alex Dewar wrote: > In svm_set_nested_state(), if nested_svm_vmrun_msrpm() returns false, > then variables save and ctl will leak. Fix this. > > Fixes: 772b81bb2f9b ("SVM: nSVM: setup nested msr permission bitmap on nested > state load") > Signed-off-by: Alex De

[PATCH] SVM: nSVM: fix resource leak on error path

2020-09-14 Thread Alex Dewar
In svm_set_nested_state(), if nested_svm_vmrun_msrpm() returns false, then variables save and ctl will leak. Fix this. Fixes: 772b81bb2f9b ("SVM: nSVM: setup nested msr permission bitmap on nested state load") Signed-off-by: Alex Dewar --- arch/x86/kvm/svm/nested.c | 2 +- 1 file changed, 1 ins