Re: [PATCH tip] KVM: nSVM: avoid freeing uninitialized pointers in svm_set_nested_state()

2020-09-14 Thread Tom Lendacky
On 9/14/20 8:37 AM, Vitaly Kuznetsov wrote: > The save and ctl pointers are passed uninitialized to kfree() when > svm_set_nested_state() follows the 'goto out_set_gif' path. While > the issue could've been fixed by initializing these on-stack varialbles > to NULL, it seems preferable to eliminate

Re: [PATCH tip] KVM: nSVM: avoid freeing uninitialized pointers in svm_set_nested_state()

2020-09-14 Thread Joerg Roedel
On Mon, Sep 14, 2020 at 03:37:25PM +0200, Vitaly Kuznetsov wrote: > The save and ctl pointers are passed uninitialized to kfree() when > svm_set_nested_state() follows the 'goto out_set_gif' path. While > the issue could've been fixed by initializing these on-stack varialbles > to NULL, it seems pr

Re: [PATCH tip] KVM: nSVM: avoid freeing uninitialized pointers in svm_set_nested_state()

2020-09-14 Thread Sean Christopherson
On Mon, Sep 14, 2020 at 03:37:25PM +0200, Vitaly Kuznetsov wrote: > The save and ctl pointers are passed uninitialized to kfree() when > svm_set_nested_state() follows the 'goto out_set_gif' path. While > the issue could've been fixed by initializing these on-stack varialbles > to NULL, it seems pr

[PATCH tip] KVM: nSVM: avoid freeing uninitialized pointers in svm_set_nested_state()

2020-09-14 Thread Vitaly Kuznetsov
The save and ctl pointers are passed uninitialized to kfree() when svm_set_nested_state() follows the 'goto out_set_gif' path. While the issue could've been fixed by initializing these on-stack varialbles to NULL, it seems preferable to eliminate 'out_set_gif' label completely as it is not actually