diff options
author | 2023-07-28 18:35:07 -0700 | |
---|---|---|
committer | 2023-08-31 13:48:51 -0400 | |
commit | f046923af79158361295ed4f0a588c80b9fdcc1d (patch) | |
tree | ff3aaa262330b4db36bd5bbd09b27011cfc18a2b /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | KVM: x86/mmu: BUG() in rmap helpers iff CONFIG_BUG_ON_DATA_CORRUPTION=y (diff) | |
download | wireguard-linux-f046923af79158361295ed4f0a588c80b9fdcc1d.tar.xz wireguard-linux-f046923af79158361295ed4f0a588c80b9fdcc1d.zip |
drm/i915/gvt: Verify pfn is "valid" before dereferencing "struct page"
Check that the pfn found by gfn_to_pfn() is actually backed by "struct
page" memory prior to retrieving and dereferencing the page. KVM
supports backing guest memory with VM_PFNMAP, VM_IO, etc., and so
there is no guarantee the pfn returned by gfn_to_pfn() has an associated
"struct page".
Fixes: b901b252b6cf ("drm/i915/gvt: Add 2M huge gtt support")
Reviewed-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Link: https://lore.kernel.org/r/20230729013535.1070024-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions