]> git.baikalelectronics.ru Git - kernel.git/commit
drm/shmem-helper: Remove errant put in error path
authorRob Clark <robdclark@chromium.org>
Wed, 30 Nov 2022 18:57:47 +0000 (10:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Dec 2022 10:30:43 +0000 (11:30 +0100)
commita405030d60a6408246e81b5dcdff6d04836a10d4
treeacb8fdf8c8b7606cc907897777090c9903c5413e
parentcf9dcb4cce3d59dfbde28d8b0ea6ce3ac88dafa6
drm/shmem-helper: Remove errant put in error path

commit 24013314be6ee4ee456114a671e9fa3461323de8 upstream.

drm_gem_shmem_mmap() doesn't own this reference, resulting in the GEM
object getting prematurely freed leading to a later use-after-free.

Link: https://syzkaller.appspot.com/bug?extid=c8ae65286134dd1b800d
Reported-by: syzbot+c8ae65286134dd1b800d@syzkaller.appspotmail.com
Fixes: 1f4e743ab37e ("drm: Add library for shmem backed GEM objects")
Cc: stable@vger.kernel.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221130185748.357410-2-robdclark@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_gem_shmem_helper.c