* [bug report] KVM: SVM: hyper-v: Enlightened MSR-Bitmap support
@ 2021-06-25 10:21 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-06-25 10:21 UTC (permalink / raw)
To: viremana; +Cc: kvm
Hello Vineeth Pillai,
This is a semi-automatic email about new static checker warnings.
The patch c4327f15dfc7: "KVM: SVM: hyper-v: Enlightened MSR-Bitmap
support" from Jun 3, 2021, leads to the following Smatch complaint:
arch/x86/kvm/svm/svm_onhyperv.h:92 svm_hv_vmcb_dirty_nested_enlightenments()
warn: variable dereferenced before check 'vmcb' (see line 84)
arch/x86/kvm/svm/svm_onhyperv.h
83 struct hv_enlightenments *hve =
84 (struct hv_enlightenments *)vmcb->control.reserved_sw;
^^^^^^^^^^^^^^^^^^^^^^^^^
Dereferenced
85
86 /*
87 * vmcb can be NULL if called during early vcpu init.
^^^^^^^^^^^^^^^^
Probably shouldn't be Dereferenced
88 * And its okay not to mark vmcb dirty during vcpu init
89 * as we mark it dirty unconditionally towards end of vcpu
90 * init phase.
91 */
92 if (vmcb && vmcb_is_clean(vmcb, VMCB_HV_NESTED_ENLIGHTENMENTS) &&
^^^^
93 hve->hv_enlightenments_control.msr_bitmap)
94 vmcb_mark_dirty(vmcb, VMCB_HV_NESTED_ENLIGHTENMENTS);
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-25 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 10:21 [bug report] KVM: SVM: hyper-v: Enlightened MSR-Bitmap support Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).