diff options
| author | Vitaly Kuznetsov <[email protected]> | 2020-09-14 15:37:25 +0200 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2020-09-28 07:56:43 -0400 |
| commit | d5cd6f34014592a232ce79dc25e295778bd43c22 (patch) | |
| tree | ef7e0c26bbbe5e1cd1e3f3072ffee17986f5292a /tools/perf/scripts/python/stackcollapse.py | |
| parent | 2e3df760cd7c284494d874726e4f13ae9c34f068 (diff) | |
KVM: nSVM: Avoid freeing uninitialized pointers in svm_set_nested_state()
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 a failure path and duplicating a single svm_set_gif()
call doesn't look too bad.
[ bp: Drop obscure Addresses-Coverity: tag. ]
Fixes: 6ccbd29ade0d ("KVM: SVM: nested: Don't allocate VMCB structures on stack")
Reported-by: Dan Carpenter <[email protected]>
Reported-by: Joerg Roedel <[email protected]>
Reported-by: Colin King <[email protected]>
Signed-off-by: Vitaly Kuznetsov <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Acked-by: Joerg Roedel <[email protected]>
Tested-by: Tom Lendacky <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions