summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-25 11:28:36 +1000
committerDave Airlie <airlied@redhat.com>2020-09-25 11:30:00 +1000
commitba78755e0c25dec4151880a14f523e929b2052c6 (patch)
tree4df02edf1dcfd85ccb5486ebba69e56629edbdc3
parentf3231a02aabeccb09348b955423a99d7919566db (diff)
parent19a508bd1ad8e444de86873bf2f2b2ab8edd6552 (diff)
Merge tag 'drm-misc-fixes-2020-09-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixesdrm-fixes-2020-09-25
drm-misc-fixes for v5.9: - Single null pointer deref fix for dma-buf. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/4106c21e-f52c-4c05-6cdb-daa743bb8617@linux.intel.com
-rw-r--r--drivers/dma-buf/dma-buf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 58564d82a3a2..844967f98866 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -59,6 +59,8 @@ static void dma_buf_release(struct dentry *dentry)
struct dma_buf *dmabuf;
dmabuf = dentry->d_fsdata;
+ if (unlikely(!dmabuf))
+ return;
BUG_ON(dmabuf->vmapping_counter);