]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/i915/fb: Fix the set_tiling vs. addfb race, again
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 3 Oct 2025 14:57:31 +0000 (17:57 +0300)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 13 Oct 2025 18:08:41 +0000 (14:08 -0400)
commit86af6b90e0556fcefbc6e98eb78bdce90327ee76
treebc09bd92df896fa1c5f7f5e445e6da9120beac09
parent760039c95c78490c5c66ef584fcd536797ed6a2f
drm/i915/fb: Fix the set_tiling vs. addfb race, again

intel_frontbuffer_get() is what locks out subsequent set_tiling
changes to the bo. Thus the fence vs. modifier check must be done
after intel_frontbuffer_get(), or else a concurrent set_tiling ioctl
might sneak in and change the fence after the check has been done.

Close the race again. See commit dd689287b977 ("drm/i915: Prevent
concurrent tiling/framebuffer modifications") for the previous
instance.

v2: Reorder intel_user_framebuffer_destroy() to match the unwind (Jani)

Cc: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Fixes: 10690b8a49bc ("drm/i915/display: Add intel_fb_bo_framebuffer_fini")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251003145734.7634-3-ville.syrjala@linux.intel.com
(cherry picked from commit 1d1e4ded216017f8febd91332ee337f0e0e79285)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/display/intel_fb.c