This is a note to let you know that I've just added the patch titled drm/shmem-helper: Add missing vunmap on error to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-shmem-helper-add-missing-vunmap-on-error.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From df4aaf015775221dde8a51ee09edb919981f091e Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> Date: Thu, 30 Jun 2022 23:00:57 +0300 Subject: drm/shmem-helper: Add missing vunmap on error From: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> commit df4aaf015775221dde8a51ee09edb919981f091e upstream. The vmapping of dma-buf may succeed, but DRM SHMEM rejects the IOMEM mapping, and thus, drm_gem_shmem_vmap_locked() should unvmap the IOMEM before erroring out. Cc: stable@xxxxxxxxxxxxxxx Fixes: 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends") Signed-off-by: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20220630200058.1883506-2-dmitry.osipenko@xxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_gem_shmem_helper.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -302,6 +302,7 @@ static int drm_gem_shmem_vmap_locked(str ret = dma_buf_vmap(obj->import_attach->dmabuf, map); if (!ret) { if (WARN_ON(map->is_iomem)) { + dma_buf_vunmap(obj->import_attach->dmabuf, map); ret = -EIO; goto err_put_pages; } Patches currently in stable-queue which might be from dmitry.osipenko@xxxxxxxxxxxxx are queue-5.19/drm-tegra-fix-vmapping-of-prime-buffers.patch queue-5.19/drm-shmem-helper-add-missing-vunmap-on-error.patch queue-5.19/drm-gem-properly-annotate-ww-context-on-drm_gem_lock_reservations-error.patch