[Intel-gfx] [PATCH 2/4] Klock work Fix for NULL dereferencing in i915_gem_mman.c
Bommu Krishnaiah
krishnaiah.bommu at intel.com
Mon Jun 28 14:38:27 UTC 2021
Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index a90f796e85c03..cad33cd49ba95 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -961,6 +961,8 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
vma->vm_private_data = mmo;
+ GEM_BUG_ON(!mmo);
+
switch (mmo->mmap_type) {
case I915_MMAP_TYPE_WC:
vma->vm_page_prot =
--
2.25.1
More information about the Intel-gfx
mailing list