diff options
| author | saturneric <[email protected]> | 2025-12-02 21:44:00 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-12-02 21:44:00 +0000 |
| commit | aa766e96efd6b62fd4dc7750134624f2c633cc55 (patch) | |
| tree | 06078a9d8cbb6227f541e18545aa68f082d86242 /drivers/gpu/drm/msm/msm_iommu.c | |
| parent | Merge tag 'v6.17.8' into linux-6.17.y (diff) | |
| parent | Linux 6.17.10 (diff) | |
| download | kernel-linux-6.17.y.tar.gz kernel-linux-6.17.y.zip | |
Merge tag 'v6.17.10' into linux-6.17.ylinux-6.17.y
This is the 6.17.10 stable release
Diffstat (limited to 'drivers/gpu/drm/msm/msm_iommu.c')
| -rw-r--r-- | drivers/gpu/drm/msm/msm_iommu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index 76cdd5ea06a0..10ef47ffb787 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -338,6 +338,8 @@ msm_iommu_pagetable_prealloc_allocate(struct msm_mmu *mmu, struct msm_mmu_preall ret = kmem_cache_alloc_bulk(pt_cache, GFP_KERNEL, p->count, p->pages); if (ret != p->count) { + kfree(p->pages); + p->pages = NULL; p->count = ret; return -ENOMEM; } @@ -351,6 +353,9 @@ msm_iommu_pagetable_prealloc_cleanup(struct msm_mmu *mmu, struct msm_mmu_preallo struct kmem_cache *pt_cache = get_pt_cache(mmu); uint32_t remaining_pt_count = p->count - p->ptr; + if (!p->pages) + return; + if (p->count > 0) trace_msm_mmu_prealloc_cleanup(p->count, remaining_pt_count); |
