<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/gpu, branch v6.6.138</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drm/vc4: platform_get_irq_byname() returns an int</title>
<updated>2026-04-27T13:23:30+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-02-23T15:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=63c11b19cdc154fa848a6c3b535bfb1dc7b60378'/>
<id>63c11b19cdc154fa848a6c3b535bfb1dc7b60378</id>
<content type='text'>
commit e597a809a2b97e927060ba182f58eb3e6101bc70 upstream.

platform_get_irq_byname() will return a negative value if an error
happens, so it should be checked and not just passed directly into
devm_request_threaded_irq() hoping all will be ok.

Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Cc: Maíra Canal &lt;mcanal@igalia.com&gt;
Cc: Raspberry Pi Kernel Maintenance &lt;kernel-list@raspberrypi.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: David Airlie &lt;airlied@gmail.com&gt;
Cc: Simona Vetter &lt;simona@ffwll.ch&gt;
Cc: stable &lt;stable@kernel.org&gt;
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022339-cornflake-t-shirt-2471@gregkh
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e597a809a2b97e927060ba182f58eb3e6101bc70 upstream.

platform_get_irq_byname() will return a negative value if an error
happens, so it should be checked and not just passed directly into
devm_request_threaded_irq() hoping all will be ok.

Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Cc: Maíra Canal &lt;mcanal@igalia.com&gt;
Cc: Raspberry Pi Kernel Maintenance &lt;kernel-list@raspberrypi.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: David Airlie &lt;airlied@gmail.com&gt;
Cc: Simona Vetter &lt;simona@ffwll.ch&gt;
Cc: stable &lt;stable@kernel.org&gt;
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022339-cornflake-t-shirt-2471@gregkh
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/psr: Do not use pipe_src as borders for SU area</title>
<updated>2026-04-27T13:23:29+00:00</updated>
<author>
<name>Jouni Högander</name>
<email>jouni.hogander@intel.com</email>
</author>
<published>2026-04-13T16:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e2e0e78843145a84f5f18f920a82cb9c99008c99'/>
<id>e2e0e78843145a84f5f18f920a82cb9c99008c99</id>
<content type='text'>
[ Upstream commit 75519f5df2a9b23f7bf305e12dc9a6e3e65c24b7 ]

This far using crtc_state-&gt;pipe_src as borders for Selective Update area
haven't caused visible problems as drm_rect_width(crtc_state-&gt;pipe_src) ==
crtc_state-&gt;hw.adjusted_mode.crtc_hdisplay and
drm_rect_height(crtc_state-&gt;pipe_src) ==
crtc_state-&gt;hw.adjusted_mode.crtc_vdisplay when pipe scaling is not
used. On the other hand using pipe scaling is forcing full frame updates and all the
Selective Update area calculations are skipped. Now this improper usage of
crtc_state-&gt;pipe_src is causing following warnings:

&lt;4&gt; [7771.978166] xe 0000:00:02.0: [drm] drm_WARN_ON_ONCE(su_lines % vdsc_cfg-&gt;slice_height)

after WARN_ON_ONCE was added by commit:

"drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters"

These warnings are seen when DSC and pipe scaling are enabled
simultaneously. This is because on full frame update SU area is improperly
set as pipe_src which is not aligned with DSC slice height.

Fix these by creating local rectangle using
crtc_state-&gt;hw.adjusted_mode.crtc_hdisplay and
crtc_state-&gt;hw.adjusted_mode.crtc_vdisplay. Use this local rectangle as
borders for SU area.

Fixes: d6774b8c3c58 ("drm/i915: Ensure damage clip area is within pipe area")
Cc: &lt;stable@vger.kernel.org&gt; # v6.0+
Signed-off-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Reviewed-by: Mika Kahola &lt;mika.kahola@intel.com&gt;
Link: https://patch.msgid.link/20260327114553.195285-1-jouni.hogander@intel.com
(cherry picked from commit da0cdc1c329dd2ff09c41fbbe9fbd9c92c5d2c6e)
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
[ omitted hunks for DSC selective update ET alignment infrastructure ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 75519f5df2a9b23f7bf305e12dc9a6e3e65c24b7 ]

This far using crtc_state-&gt;pipe_src as borders for Selective Update area
haven't caused visible problems as drm_rect_width(crtc_state-&gt;pipe_src) ==
crtc_state-&gt;hw.adjusted_mode.crtc_hdisplay and
drm_rect_height(crtc_state-&gt;pipe_src) ==
crtc_state-&gt;hw.adjusted_mode.crtc_vdisplay when pipe scaling is not
used. On the other hand using pipe scaling is forcing full frame updates and all the
Selective Update area calculations are skipped. Now this improper usage of
crtc_state-&gt;pipe_src is causing following warnings:

&lt;4&gt; [7771.978166] xe 0000:00:02.0: [drm] drm_WARN_ON_ONCE(su_lines % vdsc_cfg-&gt;slice_height)

after WARN_ON_ONCE was added by commit:

"drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters"

These warnings are seen when DSC and pipe scaling are enabled
simultaneously. This is because on full frame update SU area is improperly
set as pipe_src which is not aligned with DSC slice height.

Fix these by creating local rectangle using
crtc_state-&gt;hw.adjusted_mode.crtc_hdisplay and
crtc_state-&gt;hw.adjusted_mode.crtc_vdisplay. Use this local rectangle as
borders for SU area.

Fixes: d6774b8c3c58 ("drm/i915: Ensure damage clip area is within pipe area")
Cc: &lt;stable@vger.kernel.org&gt; # v6.0+
Signed-off-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Reviewed-by: Mika Kahola &lt;mika.kahola@intel.com&gt;
Link: https://patch.msgid.link/20260327114553.195285-1-jouni.hogander@intel.com
(cherry picked from commit da0cdc1c329dd2ff09c41fbbe9fbd9c92c5d2c6e)
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
[ omitted hunks for DSC selective update ET alignment infrastructure ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/vc4: Protect madv read in vc4_gem_object_mmap() with madv_lock</title>
<updated>2026-04-27T13:23:27+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2026-03-30T17:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34160cca50ec4fee0c5207f80a4741195e58c207'/>
<id>34160cca50ec4fee0c5207f80a4741195e58c207</id>
<content type='text'>
[ Upstream commit 338c56050d8e892604da97f67bfa8cc4015a955f ]

The mmap callback reads bo-&gt;madv without holding madv_lock, racing with
concurrent DRM_IOCTL_VC4_GEM_MADVISE calls that modify the field under
the same lock. Add the missing locking to prevent the data race.

Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-4-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 338c56050d8e892604da97f67bfa8cc4015a955f ]

The mmap callback reads bo-&gt;madv without holding madv_lock, racing with
concurrent DRM_IOCTL_VC4_GEM_MADVISE calls that modify the field under
the same lock. Add the missing locking to prevent the data race.

Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-4-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/vc4: Fix a memory leak in hang state error path</title>
<updated>2026-04-27T13:23:27+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2026-03-30T17:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dd5c49787a32da96a2b154427eb17cbf12a83c28'/>
<id>dd5c49787a32da96a2b154427eb17cbf12a83c28</id>
<content type='text'>
[ Upstream commit 9525d169e5fd481538cf8c663cc5839e54f2e481 ]

When vc4_save_hang_state() encounters an early return condition, it
returns without freeing the previously allocated `kernel_state`,
leaking memory.

Add the missing kfree() calls by consolidating the early return paths
into a single place.

Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-3-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 9525d169e5fd481538cf8c663cc5839e54f2e481 ]

When vc4_save_hang_state() encounters an early return condition, it
returns without freeing the previously allocated `kernel_state`,
leaking memory.

Add the missing kfree() calls by consolidating the early return paths
into a single place.

Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-3-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/vc4: Fix memory leak of BO array in hang state</title>
<updated>2026-04-27T13:23:27+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2026-03-30T17:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a812008fe3a0aebb778d277b35717f64e23d0302'/>
<id>a812008fe3a0aebb778d277b35717f64e23d0302</id>
<content type='text'>
[ Upstream commit f4dfd6847b3e5d24e336bca6057485116d17aea4 ]

The hang state's BO array is allocated separately with kzalloc() in
vc4_save_hang_state() but never freed in vc4_free_hang_state(). Add the
missing kfree() for the BO array before freeing the hang state struct.

Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-2-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f4dfd6847b3e5d24e336bca6057485116d17aea4 ]

The hang state's BO array is allocated separately with kzalloc() in
vc4_save_hang_state() but never freed in vc4_free_hang_state(). Add the
missing kfree() for the BO array before freeing the hang state struct.

Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-2-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/vc4: Release runtime PM reference after binding V3D</title>
<updated>2026-04-27T13:23:27+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2026-03-30T17:51:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5befb65dca902815c0b06e6feec4260a4b3dc80f'/>
<id>5befb65dca902815c0b06e6feec4260a4b3dc80f</id>
<content type='text'>
[ Upstream commit aaefbdde9abdc43699e110679c0e10972a5e1c59 ]

The vc4_v3d_bind() function acquires a runtime PM reference via
pm_runtime_resume_and_get() to access V3D registers during setup.
However, this reference is never released after a successful bind.
This prevents the device from ever runtime suspending, since the
reference count never reaches zero.

Release the runtime PM reference by adding pm_runtime_put_autosuspend()
after autosuspend is configured, allowing the device to runtime suspend
after the delay.

Fixes: 266cff37d7fc ("drm/vc4: v3d: Rework the runtime_pm setup")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-1-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit aaefbdde9abdc43699e110679c0e10972a5e1c59 ]

The vc4_v3d_bind() function acquires a runtime PM reference via
pm_runtime_resume_and_get() to access V3D registers during setup.
However, this reference is never released after a successful bind.
This prevents the device from ever runtime suspending, since the
reference count never reaches zero.

Release the runtime PM reference by adding pm_runtime_put_autosuspend()
after autosuspend is configured, allowing the device to runtime suspend
after the delay.

Fixes: 266cff37d7fc ("drm/vc4: v3d: Rework the runtime_pm setup")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-1-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/gt: fix refcount underflow in intel_engine_park_heartbeat</title>
<updated>2026-04-18T08:39:52+00:00</updated>
<author>
<name>Sebastian Brzezinka</name>
<email>sebastian.brzezinka@intel.com</email>
</author>
<published>2026-04-01T10:10:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ca3f48c3567dd49efdc55b80029ae74659c682ee'/>
<id>ca3f48c3567dd49efdc55b80029ae74659c682ee</id>
<content type='text'>
commit 4c71fd099513bfa8acab529b626e1f0097b76061 upstream.

A use-after-free / refcount underflow is possible when the heartbeat
worker and intel_engine_park_heartbeat() race to release the same
engine-&gt;heartbeat.systole request.

The heartbeat worker reads engine-&gt;heartbeat.systole and calls
i915_request_put() on it when the request is complete, but clears
the pointer in a separate, non-atomic step. Concurrently, a request
retirement on another CPU can drop the engine wakeref to zero, triggering
__engine_park() -&gt; intel_engine_park_heartbeat(). If the heartbeat
timer is pending at that point, cancel_delayed_work() returns true and
intel_engine_park_heartbeat() reads the stale non-NULL systole pointer
and calls i915_request_put() on it again, causing a refcount underflow:

```
&lt;4&gt; [487.221889] Workqueue: i915-unordered engine_retire [i915]
&lt;4&gt; [487.222640] RIP: 0010:refcount_warn_saturate+0x68/0xb0
...
&lt;4&gt; [487.222707] Call Trace:
&lt;4&gt; [487.222711]  &lt;TASK&gt;
&lt;4&gt; [487.222716]  intel_engine_park_heartbeat.part.0+0x6f/0x80 [i915]
&lt;4&gt; [487.223115]  intel_engine_park_heartbeat+0x25/0x40 [i915]
&lt;4&gt; [487.223566]  __engine_park+0xb9/0x650 [i915]
&lt;4&gt; [487.223973]  ____intel_wakeref_put_last+0x2e/0xb0 [i915]
&lt;4&gt; [487.224408]  __intel_wakeref_put_last+0x72/0x90 [i915]
&lt;4&gt; [487.224797]  intel_context_exit_engine+0x7c/0x80 [i915]
&lt;4&gt; [487.225238]  intel_context_exit+0xf1/0x1b0 [i915]
&lt;4&gt; [487.225695]  i915_request_retire.part.0+0x1b9/0x530 [i915]
&lt;4&gt; [487.226178]  i915_request_retire+0x1c/0x40 [i915]
&lt;4&gt; [487.226625]  engine_retire+0x122/0x180 [i915]
&lt;4&gt; [487.227037]  process_one_work+0x239/0x760
&lt;4&gt; [487.227060]  worker_thread+0x200/0x3f0
&lt;4&gt; [487.227068]  ? __pfx_worker_thread+0x10/0x10
&lt;4&gt; [487.227075]  kthread+0x10d/0x150
&lt;4&gt; [487.227083]  ? __pfx_kthread+0x10/0x10
&lt;4&gt; [487.227092]  ret_from_fork+0x3d4/0x480
&lt;4&gt; [487.227099]  ? __pfx_kthread+0x10/0x10
&lt;4&gt; [487.227107]  ret_from_fork_asm+0x1a/0x30
&lt;4&gt; [487.227141]  &lt;/TASK&gt;
```

Fix this by replacing the non-atomic pointer read + separate clear with
xchg() in both racing paths. xchg() is a single indivisible hardware
instruction that atomically reads the old pointer and writes NULL. This
guarantees only one of the two concurrent callers obtains the non-NULL
pointer and performs the put, the other gets NULL and skips it.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/15880
Fixes: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats")
Cc: &lt;stable@vger.kernel.org&gt; # v5.5+
Signed-off-by: Sebastian Brzezinka &lt;sebastian.brzezinka@intel.com&gt;
Reviewed-by: Krzysztof Karas &lt;krzysztof.karas@intel.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Link: https://lore.kernel.org/r/d4c1c14255688dd07cc8044973c4f032a8d1559e.1775038106.git.sebastian.brzezinka@intel.com
(cherry picked from commit 13238dc0ee4f9ab8dafa2cca7295736191ae2f42)
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4c71fd099513bfa8acab529b626e1f0097b76061 upstream.

A use-after-free / refcount underflow is possible when the heartbeat
worker and intel_engine_park_heartbeat() race to release the same
engine-&gt;heartbeat.systole request.

The heartbeat worker reads engine-&gt;heartbeat.systole and calls
i915_request_put() on it when the request is complete, but clears
the pointer in a separate, non-atomic step. Concurrently, a request
retirement on another CPU can drop the engine wakeref to zero, triggering
__engine_park() -&gt; intel_engine_park_heartbeat(). If the heartbeat
timer is pending at that point, cancel_delayed_work() returns true and
intel_engine_park_heartbeat() reads the stale non-NULL systole pointer
and calls i915_request_put() on it again, causing a refcount underflow:

```
&lt;4&gt; [487.221889] Workqueue: i915-unordered engine_retire [i915]
&lt;4&gt; [487.222640] RIP: 0010:refcount_warn_saturate+0x68/0xb0
...
&lt;4&gt; [487.222707] Call Trace:
&lt;4&gt; [487.222711]  &lt;TASK&gt;
&lt;4&gt; [487.222716]  intel_engine_park_heartbeat.part.0+0x6f/0x80 [i915]
&lt;4&gt; [487.223115]  intel_engine_park_heartbeat+0x25/0x40 [i915]
&lt;4&gt; [487.223566]  __engine_park+0xb9/0x650 [i915]
&lt;4&gt; [487.223973]  ____intel_wakeref_put_last+0x2e/0xb0 [i915]
&lt;4&gt; [487.224408]  __intel_wakeref_put_last+0x72/0x90 [i915]
&lt;4&gt; [487.224797]  intel_context_exit_engine+0x7c/0x80 [i915]
&lt;4&gt; [487.225238]  intel_context_exit+0xf1/0x1b0 [i915]
&lt;4&gt; [487.225695]  i915_request_retire.part.0+0x1b9/0x530 [i915]
&lt;4&gt; [487.226178]  i915_request_retire+0x1c/0x40 [i915]
&lt;4&gt; [487.226625]  engine_retire+0x122/0x180 [i915]
&lt;4&gt; [487.227037]  process_one_work+0x239/0x760
&lt;4&gt; [487.227060]  worker_thread+0x200/0x3f0
&lt;4&gt; [487.227068]  ? __pfx_worker_thread+0x10/0x10
&lt;4&gt; [487.227075]  kthread+0x10d/0x150
&lt;4&gt; [487.227083]  ? __pfx_kthread+0x10/0x10
&lt;4&gt; [487.227092]  ret_from_fork+0x3d4/0x480
&lt;4&gt; [487.227099]  ? __pfx_kthread+0x10/0x10
&lt;4&gt; [487.227107]  ret_from_fork_asm+0x1a/0x30
&lt;4&gt; [487.227141]  &lt;/TASK&gt;
```

Fix this by replacing the non-atomic pointer read + separate clear with
xchg() in both racing paths. xchg() is a single indivisible hardware
instruction that atomically reads the old pointer and writes NULL. This
guarantees only one of the two concurrent callers obtains the non-NULL
pointer and performs the put, the other gets NULL and skips it.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/15880
Fixes: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats")
Cc: &lt;stable@vger.kernel.org&gt; # v5.5+
Signed-off-by: Sebastian Brzezinka &lt;sebastian.brzezinka@intel.com&gt;
Reviewed-by: Krzysztof Karas &lt;krzysztof.karas@intel.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Link: https://lore.kernel.org/r/d4c1c14255688dd07cc8044973c4f032a8d1559e.1775038106.git.sebastian.brzezinka@intel.com
(cherry picked from commit 13238dc0ee4f9ab8dafa2cca7295736191ae2f42)
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug"</title>
<updated>2026-04-18T08:39:51+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>dev@lankhorst.se</email>
</author>
<published>2026-04-13T08:03:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=533e0a0454d06a784096cd349070dfcb18d523b2'/>
<id>533e0a0454d06a784096cd349070dfcb18d523b2</id>
<content type='text'>
commit 45ebe43ea00d6b9f5b3e0db9c35b8ca2a96b7e70 upstream.

This reverts commit 6bee098b91417654703e17eb5c1822c6dfd0c01d.

Den 2026-03-25 kl. 22:11, skrev Simona Vetter:
&gt; On Wed, Mar 25, 2026 at 10:26:40AM -0700, Guenter Roeck wrote:
&gt;&gt; Hi,
&gt;&gt;
&gt;&gt; On Fri, Mar 13, 2026 at 04:17:27PM +0100, Maarten Lankhorst wrote:
&gt;&gt;&gt; When trying to do a rather aggressive test of igt's "xe_module_load
&gt;&gt;&gt; --r reload" with a full desktop environment and game running I noticed
&gt;&gt;&gt; a few OOPSes when dereferencing freed pointers, related to
&gt;&gt;&gt; framebuffers and property blobs after the compositor exits.
&gt;&gt;&gt;
&gt;&gt;&gt; Solve this by guarding the freeing in drm_file with drm_dev_enter/exit,
&gt;&gt;&gt; and immediately put the references from struct drm_file objects during
&gt;&gt;&gt; drm_dev_unplug().
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt; With this patch in v6.18.20, I get the warning backtraces below.
&gt;&gt; The backtraces are gone with the patch reverted.
&gt;
&gt; Yeah, this needs to be reverted, reasoning below. Maarten, can you please
&gt; take care of that and feed the revert through the usual channels? I don't
&gt; think it's critical enough that we need to fast-track this into drm.git
&gt; directly.
&gt;
&gt; Quoting the patch here again:
&gt;
&gt;&gt;  drivers/gpu/drm/drm_file.c| 5 ++++-
&gt;&gt;  drivers/gpu/drm/drm_mode_config.c | 9 ++++++---
&gt;&gt;  2 files changed, 10 insertions(+), 4 deletions(-)
&gt;&gt;
&gt;&gt; diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
&gt;&gt; index ec820686b3021..f52141f842a1f 100644
&gt;&gt; --- a/drivers/gpu/drm/drm_file.c
&gt;&gt; +++ b/drivers/gpu/drm/drm_file.c
&gt;&gt; @@ -233,6 +233,7 @@ static void drm_events_release(struct drm_file *file_priv)
&gt;&gt;  void drm_file_free(struct drm_file *file)
&gt;&gt;  {
&gt;&gt;  struct drm_device *dev;
&gt;&gt; +int idx;
&gt;&gt;
&gt;&gt;  if (!file)
&gt;&gt;  return;
&gt;&gt; @@ -249,9 +250,11 @@ void drm_file_free(struct drm_file *file)
&gt;&gt;
&gt;&gt;  drm_events_release(file);
&gt;&gt;
&gt;&gt; -if (drm_core_check_feature(dev, DRIVER_MODESET)) {
&gt;&gt; +if (drm_core_check_feature(dev, DRIVER_MODESET) &amp;&amp;
&gt;&gt; +drm_dev_enter(dev, &amp;idx)) {
&gt;
&gt; This is misplaced for two reasons:
&gt;
&gt; - Even if we'd want to guarantee that we hold a drm_dev_enter/exit
&gt;   reference during framebuffer teardown, we'd need to do this
&gt;   _consistently over all callsites. Not ad-hoc in just one place that a
&gt;   testcase hits. This also means kerneldoc updates of the relevant hooks
&gt;   and at least a bunch of acks from other driver people to document the
&gt;   consensus.
&gt;
&gt; - More importantly, this is driver responsibilities in general unless we
&gt;   have extremely good reasons to the contrary. Which means this must be
&gt;   placed in xe.
&gt;
&gt;&gt;  drm_fb_release(file);
&gt;&gt;  drm_property_destroy_user_blobs(dev, file);
&gt;&gt; +drm_dev_exit(idx);
&gt;&gt;  }
&gt;&gt;
&gt;&gt;  if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
&gt;&gt; diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
&gt;&gt; index 84ae8a23a3678..e349418978f79 100644
&gt;&gt; --- a/drivers/gpu/drm/drm_mode_config.c
&gt;&gt; +++ b/drivers/gpu/drm/drm_mode_config.c
&gt;&gt; @@ -583,10 +583,13 @@ void drm_mode_config_cleanup(struct drm_device *dev)
&gt;&gt;   */
&gt;&gt;  WARN_ON(!list_empty(&amp;dev-&gt;mode_config.fb_list));
&gt;&gt;  list_for_each_entry_safe(fb, fbt, &amp;dev-&gt;mode_config.fb_list, head) {
&gt;&gt; -struct drm_printer p = drm_dbg_printer(dev, DRM_UT_KMS, "[leaked fb]");
&gt;&gt; +if (list_empty(&amp;fb-&gt;filp_head) || drm_framebuffer_read_refcount(fb) &gt; 1) {
&gt;&gt; +struct drm_printer p = drm_dbg_printer(dev, DRM_UT_KMS, "[leaked fb]");
&gt;
&gt; This is also wrong:
&gt;
&gt; - Firstly, it's a completely independent bug, we do not smash two bugfixes
&gt;   into one patch.
&gt;
&gt; - Secondly, it's again a driver bug: drm_mode_cleanup must be called when
&gt;   the last drm_device reference disappears (hence the existence of
&gt;   drmm_mode_config_init), not when the driver gets unbound. The fact that
&gt;   this shows up in a callchain from a devres cleanup means the intel
&gt;   driver gets this wrong (like almost everyone else because historically
&gt;   we didn't know better).
&gt;
&gt;   If we don't follow this rule, then we get races with this code here
&gt;   running concurrently with drm_file fb cleanups, which just does not
&gt;   work. Review pointed that out, but then shrugged it off with a confused
&gt;   explanation:
&gt;
&gt;   https://lore.kernel.org/all/e61e64c796ccfb17ae673331a3df4b877bf42d82.camel@linux.intel.com/
&gt;
&gt;   Yes this also means a lot of the other drm_device teardown that drivers
&gt;   do happens way too early. There is a massive can of worms here of a
&gt;   magnitude that most likely is much, much bigger than what you can
&gt;   backport to stable kernels. Hotunplug is _hard_.

Back to the drawing board, and fixing it in the intel display driver
instead.

Cc: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Fixes: 6bee098b9141 ("drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug")
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Simona Vetter &lt;simona.vetter@ffwll.ch&gt;
Signed-off-by: Maarten Lankhorst &lt;dev@lankhorst.se&gt;
Link: https://patch.msgid.link/20260326082217.39941-2-dev@lankhorst.se
[ Thorsten: adjust to the v6.6.y/v6.6.y backports of 6bee098b9141 ]
Signed-off-by: Thorsten Leemhuis &lt;linux@leemhuis.info&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 45ebe43ea00d6b9f5b3e0db9c35b8ca2a96b7e70 upstream.

This reverts commit 6bee098b91417654703e17eb5c1822c6dfd0c01d.

Den 2026-03-25 kl. 22:11, skrev Simona Vetter:
&gt; On Wed, Mar 25, 2026 at 10:26:40AM -0700, Guenter Roeck wrote:
&gt;&gt; Hi,
&gt;&gt;
&gt;&gt; On Fri, Mar 13, 2026 at 04:17:27PM +0100, Maarten Lankhorst wrote:
&gt;&gt;&gt; When trying to do a rather aggressive test of igt's "xe_module_load
&gt;&gt;&gt; --r reload" with a full desktop environment and game running I noticed
&gt;&gt;&gt; a few OOPSes when dereferencing freed pointers, related to
&gt;&gt;&gt; framebuffers and property blobs after the compositor exits.
&gt;&gt;&gt;
&gt;&gt;&gt; Solve this by guarding the freeing in drm_file with drm_dev_enter/exit,
&gt;&gt;&gt; and immediately put the references from struct drm_file objects during
&gt;&gt;&gt; drm_dev_unplug().
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt; With this patch in v6.18.20, I get the warning backtraces below.
&gt;&gt; The backtraces are gone with the patch reverted.
&gt;
&gt; Yeah, this needs to be reverted, reasoning below. Maarten, can you please
&gt; take care of that and feed the revert through the usual channels? I don't
&gt; think it's critical enough that we need to fast-track this into drm.git
&gt; directly.
&gt;
&gt; Quoting the patch here again:
&gt;
&gt;&gt;  drivers/gpu/drm/drm_file.c| 5 ++++-
&gt;&gt;  drivers/gpu/drm/drm_mode_config.c | 9 ++++++---
&gt;&gt;  2 files changed, 10 insertions(+), 4 deletions(-)
&gt;&gt;
&gt;&gt; diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
&gt;&gt; index ec820686b3021..f52141f842a1f 100644
&gt;&gt; --- a/drivers/gpu/drm/drm_file.c
&gt;&gt; +++ b/drivers/gpu/drm/drm_file.c
&gt;&gt; @@ -233,6 +233,7 @@ static void drm_events_release(struct drm_file *file_priv)
&gt;&gt;  void drm_file_free(struct drm_file *file)
&gt;&gt;  {
&gt;&gt;  struct drm_device *dev;
&gt;&gt; +int idx;
&gt;&gt;
&gt;&gt;  if (!file)
&gt;&gt;  return;
&gt;&gt; @@ -249,9 +250,11 @@ void drm_file_free(struct drm_file *file)
&gt;&gt;
&gt;&gt;  drm_events_release(file);
&gt;&gt;
&gt;&gt; -if (drm_core_check_feature(dev, DRIVER_MODESET)) {
&gt;&gt; +if (drm_core_check_feature(dev, DRIVER_MODESET) &amp;&amp;
&gt;&gt; +drm_dev_enter(dev, &amp;idx)) {
&gt;
&gt; This is misplaced for two reasons:
&gt;
&gt; - Even if we'd want to guarantee that we hold a drm_dev_enter/exit
&gt;   reference during framebuffer teardown, we'd need to do this
&gt;   _consistently over all callsites. Not ad-hoc in just one place that a
&gt;   testcase hits. This also means kerneldoc updates of the relevant hooks
&gt;   and at least a bunch of acks from other driver people to document the
&gt;   consensus.
&gt;
&gt; - More importantly, this is driver responsibilities in general unless we
&gt;   have extremely good reasons to the contrary. Which means this must be
&gt;   placed in xe.
&gt;
&gt;&gt;  drm_fb_release(file);
&gt;&gt;  drm_property_destroy_user_blobs(dev, file);
&gt;&gt; +drm_dev_exit(idx);
&gt;&gt;  }
&gt;&gt;
&gt;&gt;  if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
&gt;&gt; diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
&gt;&gt; index 84ae8a23a3678..e349418978f79 100644
&gt;&gt; --- a/drivers/gpu/drm/drm_mode_config.c
&gt;&gt; +++ b/drivers/gpu/drm/drm_mode_config.c
&gt;&gt; @@ -583,10 +583,13 @@ void drm_mode_config_cleanup(struct drm_device *dev)
&gt;&gt;   */
&gt;&gt;  WARN_ON(!list_empty(&amp;dev-&gt;mode_config.fb_list));
&gt;&gt;  list_for_each_entry_safe(fb, fbt, &amp;dev-&gt;mode_config.fb_list, head) {
&gt;&gt; -struct drm_printer p = drm_dbg_printer(dev, DRM_UT_KMS, "[leaked fb]");
&gt;&gt; +if (list_empty(&amp;fb-&gt;filp_head) || drm_framebuffer_read_refcount(fb) &gt; 1) {
&gt;&gt; +struct drm_printer p = drm_dbg_printer(dev, DRM_UT_KMS, "[leaked fb]");
&gt;
&gt; This is also wrong:
&gt;
&gt; - Firstly, it's a completely independent bug, we do not smash two bugfixes
&gt;   into one patch.
&gt;
&gt; - Secondly, it's again a driver bug: drm_mode_cleanup must be called when
&gt;   the last drm_device reference disappears (hence the existence of
&gt;   drmm_mode_config_init), not when the driver gets unbound. The fact that
&gt;   this shows up in a callchain from a devres cleanup means the intel
&gt;   driver gets this wrong (like almost everyone else because historically
&gt;   we didn't know better).
&gt;
&gt;   If we don't follow this rule, then we get races with this code here
&gt;   running concurrently with drm_file fb cleanups, which just does not
&gt;   work. Review pointed that out, but then shrugged it off with a confused
&gt;   explanation:
&gt;
&gt;   https://lore.kernel.org/all/e61e64c796ccfb17ae673331a3df4b877bf42d82.camel@linux.intel.com/
&gt;
&gt;   Yes this also means a lot of the other drm_device teardown that drivers
&gt;   do happens way too early. There is a massive can of worms here of a
&gt;   magnitude that most likely is much, much bigger than what you can
&gt;   backport to stable kernels. Hotunplug is _hard_.

Back to the drawing board, and fixing it in the intel display driver
instead.

Cc: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Fixes: 6bee098b9141 ("drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug")
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Simona Vetter &lt;simona.vetter@ffwll.ch&gt;
Signed-off-by: Maarten Lankhorst &lt;dev@lankhorst.se&gt;
Link: https://patch.msgid.link/20260326082217.39941-2-dev@lankhorst.se
[ Thorsten: adjust to the v6.6.y/v6.6.y backports of 6bee098b9141 ]
Signed-off-by: Thorsten Leemhuis &lt;linux@leemhuis.info&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/dp: Use crtc_state-&gt;enhanced_framing properly on ivb/hsw CPU eDP</title>
<updated>2026-04-11T12:19:27+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2026-03-25T13:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=beadc871ccf868b153580f496a3e6269eac9ede4'/>
<id>beadc871ccf868b153580f496a3e6269eac9ede4</id>
<content type='text'>
commit 9c9a57e4e337f94e23ddf69263fd0685c91155fb upstream.

Looks like I missed the drm_dp_enhanced_frame_cap() in the ivb/hsw CPU
eDP code when I introduced crtc_state-&gt;enhanced_framing. Fix it up so
that the state we program to the hardware is guaranteed to match what
we computed earlier.

Cc: stable@vger.kernel.org
Fixes: 3072a24c778a ("drm/i915: Introduce crtc_state-&gt;enhanced_framing")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patch.msgid.link/20260325135849.12603-3-ville.syrjala@linux.intel.com
Reviewed-by: Michał Grzelak &lt;michal.grzelak@intel.com&gt;
(cherry picked from commit 799fe8dc2af52f35c78c4ac97f8e34994dfd8760)
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9c9a57e4e337f94e23ddf69263fd0685c91155fb upstream.

Looks like I missed the drm_dp_enhanced_frame_cap() in the ivb/hsw CPU
eDP code when I introduced crtc_state-&gt;enhanced_framing. Fix it up so
that the state we program to the hardware is guaranteed to match what
we computed earlier.

Cc: stable@vger.kernel.org
Fixes: 3072a24c778a ("drm/i915: Introduce crtc_state-&gt;enhanced_framing")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patch.msgid.link/20260325135849.12603-3-ville.syrjala@linux.intel.com
Reviewed-by: Michał Grzelak &lt;michal.grzelak@intel.com&gt;
(cherry picked from commit 799fe8dc2af52f35c78c4ac97f8e34994dfd8760)
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ast: dp501: Fix initialization of SCU2C</title>
<updated>2026-04-11T12:19:27+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2026-03-27T13:32:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=32ac48642e71e8455c9fce0a6307e99ad74a3511'/>
<id>32ac48642e71e8455c9fce0a6307e99ad74a3511</id>
<content type='text'>
commit 2f42c1a6161646cbd29b443459fd635d29eda634 upstream.

Ast's DP501 initialization reads the register SCU2C at offset 0x1202c
and tries to set it to source data from VGA. But writes the update to
offset 0x0, with unknown results. Write the result to SCU instead.

The bug only happens in ast_init_analog(). There's similar code in
ast_init_dvo(), which works correctly.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 83c6620bae3f ("drm/ast: initial DP501 support (v0.2)")
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: &lt;stable@vger.kernel.org&gt; # v3.16+
Link: https://patch.msgid.link/20260327133532.79696-2-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2f42c1a6161646cbd29b443459fd635d29eda634 upstream.

Ast's DP501 initialization reads the register SCU2C at offset 0x1202c
and tries to set it to source data from VGA. But writes the update to
offset 0x0, with unknown results. Write the result to SCU instead.

The bug only happens in ast_init_analog(). There's similar code in
ast_init_dvo(), which works correctly.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 83c6620bae3f ("drm/ast: initial DP501 support (v0.2)")
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: &lt;stable@vger.kernel.org&gt; # v3.16+
Link: https://patch.msgid.link/20260327133532.79696-2-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
