Skip to content
Commit 1de9992f authored by Li zeming's avatar Li zeming Committed by Sean Christopherson
Browse files

KVM: x86/mmu: Remove unnecessary ‘NULL’ values from sptep



Don't initialize "spte" and "sptep" in fast_page_fault() as they are both
guaranteed (for all intents and purposes) to be written at the start of
every loop iteration.  Add a sanity check that "sptep" is non-NULL after
walking the shadow page tables, as encountering a NULL root would result
in "spte" not being written, i.e. would lead to uninitialized data or the
previous value being consumed.

Signed-off-by: default avatarLi zeming <zeming@nfschina.com>
Link: https://lore.kernel.org/r/20230905182006.2964-1-zeming@nfschina.com
[sean: rewrite changelog with --verbose]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent c9f65a3f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment