mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-09 18:26:58 +00:00
Some users want to pass NULL to drm_gem_object_put(), but those using
__drm_gem_object_put() did not. Compromise, have both and let the
compiler sort it out.
drm_gem_fb_destroy() calls drm_gem_object_put() with NULL obj causing:
[ 11.584209] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 11.584213] #PF: supervisor write access in kernel mode
[ 11.584215] #PF: error_code(0x0002) - not-present page
[ 11.584216] PGD 0 P4D 0
[ 11.584220] Oops: 0002 [#1] SMP NOPTI
[ 11.584223] CPU: 7 PID: 1571 Comm: gnome-shell Tainted: G E 5.7.0-rc1-1-default+ #27
[ 11.584225] Hardware name: Micro-Star International Co., Ltd. MS-7A31/X370 XPOWER GAMING TITANIUM (MS-7A31), BIOS 1.MR 12/03/2019
[ 11.584237] RIP: 0010:drm_gem_fb_destroy+0x28/0x70 [drm_kms_helper]
<snip>
[ 11.584256] Call Trace:
[ 11.584279] drm_mode_rmfb+0x189/0x1c0 [drm]
[ 11.584299] ? drm_mode_rmfb+0x1c0/0x1c0 [drm]
[ 11.584314] drm_ioctl_kernel+0xaa/0xf0 [drm]
[ 11.584329] drm_ioctl+0x1ff/0x3b0 [drm]
[ 11.584347] ? drm_mode_rmfb+0x1c0/0x1c0 [drm]
[ 11.584421] amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
[ 11.584427] ksys_ioctl+0x87/0xc0
[ 11.584430] __x64_sys_ioctl+0x16/0x20
[ 11.584434] do_syscall_64+0x5f/0x240
[ 11.584438] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 11.584440] RIP: 0033:0x7f0ef80f7227
Reported-by: Nirmoy Das <nirmoy.das@amd.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| selftests | ||
| i915_gem_busy.c | ||
| i915_gem_clflush.c | ||
| i915_gem_clflush.h | ||
| i915_gem_client_blt.c | ||
| i915_gem_client_blt.h | ||
| i915_gem_context_types.h | ||
| i915_gem_context.c | ||
| i915_gem_context.h | ||
| i915_gem_dmabuf.c | ||
| i915_gem_domain.c | ||
| i915_gem_execbuffer.c | ||
| i915_gem_fence.c | ||
| i915_gem_internal.c | ||
| i915_gem_ioctls.h | ||
| i915_gem_lmem.c | ||
| i915_gem_lmem.h | ||
| i915_gem_mman.c | ||
| i915_gem_mman.h | ||
| i915_gem_object_blt.c | ||
| i915_gem_object_blt.h | ||
| i915_gem_object_types.h | ||
| i915_gem_object.c | ||
| i915_gem_object.h | ||
| i915_gem_pages.c | ||
| i915_gem_phys.c | ||
| i915_gem_pm.c | ||
| i915_gem_pm.h | ||
| i915_gem_region.c | ||
| i915_gem_region.h | ||
| i915_gem_shmem.c | ||
| i915_gem_shrinker.c | ||
| i915_gem_shrinker.h | ||
| i915_gem_stolen.c | ||
| i915_gem_stolen.h | ||
| i915_gem_throttle.c | ||
| i915_gem_tiling.c | ||
| i915_gem_userptr.c | ||
| i915_gem_wait.c | ||
| i915_gemfs.c | ||
| i915_gemfs.h | ||