diff options
author | Luca Weiss <luca@z3ntu.xyz> | 2022-04-21 23:34:53 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-05-02 20:11:44 +0300 |
commit | 36a1d1bda77e1851bddfa9cf4e8ada94476dbaff (patch) | |
tree | 01c153a59f5e01b17fed397ba0510c894446d3d9 /drivers/gpu/drm/msm/msm_gpu.c | |
parent | f1fc2b87de4719cfa8e193e0746cc524dd9f7472 (diff) | |
download | linux-36a1d1bda77e1851bddfa9cf4e8ada94476dbaff.tar.xz |
drm/msm: Fix null pointer dereferences without iommu
Check if 'aspace' is set before using it as it will stay null without
IOMMU, such as on msm8974.
Fixes: bc2112583a0b ("drm/msm/gpu: Track global faults per address-space")
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lore.kernel.org/r/20220421203455.313523-1-luca@z3ntu.xyz
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 32ffe1c0e82c..eb8a6663f309 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -391,7 +391,8 @@ static void recover_worker(struct kthread_work *work) if (submit) { /* Increment the fault counts */ submit->queue->faults++; - submit->aspace->faults++; + if (submit->aspace) + submit->aspace->faults++; get_comm_cmdline(submit, &comm, &cmd); |