<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/accel, branch master</title>
<subtitle>Linux kernel mainline source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/'/>
<updated>2026-07-10T03:03:15+00:00</updated>
<entry>
<title>Merge tag 'drm-misc-fixes-2026-07-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes</title>
<updated>2026-07-10T03:03:15+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2026-07-10T03:03:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=7978a34fd6e4eae91db0741b553e7682288d022c'/>
<id>urn:sha1:7978a34fd6e4eae91db0741b553e7682288d022c</id>
<content type='text'>
drm-misc-fixes for v7.2-rc3:
- Fix uaf in amdxdna mmap failure path.
- A lot of deadlocks, access races and return value fixes in amdxdna.
- Fix analogix_dp bitshifts during link training.
- Use direct label in drm_exec.
- Fix absent indirect bo handling in v3d.
- Sync on first active crtc in fb_dirty, rather than first crtc.
- Rework try_harder in the buddy allocator.
- Make imagination function static to solve compiler warning.
- Fix imagination error checking.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
From: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patch.msgid.link/71e5b48b-307f-47f5-8fd5-b60ea43e4196@linux.intel.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix potential NULL pointer dereference of abo-&gt;client</title>
<updated>2026-07-08T03:49:28+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T20:15:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=c69dbbf0212734e22219dfc31c0922bd7c9ffbb0'/>
<id>urn:sha1:c69dbbf0212734e22219dfc31c0922bd7c9ffbb0</id>
<content type='text'>
Closing a BO handle clears abo-&gt;client, while the underlying GEM object
may remain alive due to internal kernel references. As a result, code
executed after the BO handle is closed may dereference a NULL abo-&gt;client
pointer.

Remove accesses to abo-&gt;client from code paths that may execute after the
BO handle has been closed.

Fixes: d76856beb4a4 ("accel/amdxdna: Refactor GEM BO handling and add helper APIs for address retrieval")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707201556.562191-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Check init_srcu_struct() return value</title>
<updated>2026-07-08T03:49:19+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T17:23:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=44d8fddf1c87d6bb6b65983041a0ce6c2af66bb9'/>
<id>urn:sha1:44d8fddf1c87d6bb6b65983041a0ce6c2af66bb9</id>
<content type='text'>
The return value of init_srcu_struct() is currently ignored. If
initialization fails, subsequent use of hwctx_srcu may result in invalid
memory accesses.

Check the return value of init_srcu_struct() and propagate the error to
the caller.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707172323.539721-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Check drmm_mutex_init() return value</title>
<updated>2026-07-08T03:49:10+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T17:23:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=0f092793a7b527dfb2cde323d4e5630d43447b84'/>
<id>urn:sha1:0f092793a7b527dfb2cde323d4e5630d43447b84</id>
<content type='text'>
drmm_mutex_init() may fail and return an error. Check the return value
and abort initialization if mutex creation fails.

Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707172307.539676-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix hardware context race in amdxdna_update_heap()</title>
<updated>2026-07-07T17:04:51+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T05:58:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=928caf71e566ddc5f303f15fb9c33f16a9915f30'/>
<id>urn:sha1:928caf71e566ddc5f303f15fb9c33f16a9915f30</id>
<content type='text'>
amdxdna_update_heap() iterates over hardware contexts while holding
xdna-&gt;dev_lock. During the iteration, amdxdna_pm_resume_get_locked() may
temporarily release and reacquire the lock, allowing hardware contexts to
be modified concurrently.

Fix the race by calling amdxdna_pm_resume_get_locked() before
iterating over hardware contexts.

Fixes: dbc8fd7a03cb ("accel/amdxdna: Add expandable device heap support")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707055818.479165-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix deadlock on debug BO command timeout</title>
<updated>2026-07-07T17:04:43+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T05:57:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=c8d2530791cb53602ac06ec2db6287d99f51cdbc'/>
<id>urn:sha1:c8d2530791cb53602ac06ec2db6287d99f51cdbc</id>
<content type='text'>
Both amdxdna_hwctx_sync_debug_bo() and amdxdna_drm_config_hwctx_ioctl()
hold xdna-&gt;dev_lock while invoking backend operations. If the hardware
hangs, aie2_cmd_wait() blocks waiting for a firmware response. When the
DRM scheduler timeout expires, aie2_sched_job_timedout() is invoked to
reset the hardware. However, the timeout handler also attempts to acquire
dev_lock, resulting in a deadlock.

Avoid this by releasing dev_lock before waiting for the firmware
response and reacquiring it after the wait completes. This allows the
timeout handler to proceed with device recovery when a debug BO command
times out.

Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707055732.479103-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: fix open_ref leak and stale client pointer on dma map failure</title>
<updated>2026-07-07T17:04:34+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T05:56:58+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=66ff5c0eee02c4be67f8ba7fb6c63709ef1c92a3'/>
<id>urn:sha1:66ff5c0eee02c4be67f8ba7fb6c63709ef1c92a3</id>
<content type='text'>
amdxdna_gem_obj_open() increments open_ref before attempting to set up
the DMA address mapping.  When amdxdna_dma_map_bo() fails, the function
returned immediately without rolling back either change made on the first
open (open_ref == 1 path).

Fix it by decrementing open_ref and clearing abo-&gt;client on the error path.

Fixes: ece3e8980907 ("accel/amdxdna: Allow forcing IOVA-based DMA via module parameter")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707055658.479049-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix potential amdxdna_umap lifetime race</title>
<updated>2026-07-07T17:00:04+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-06T22:12:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=14f172eff9c19f8043a9858845f33cd034f3a41e'/>
<id>urn:sha1:14f172eff9c19f8043a9858845f33cd034f3a41e</id>
<content type='text'>
amdxdna_umap_release() calls the blocking mmu_interval_notifier_remove()
before removing the object from abo-&gt;mem.umap_list. If
aie2_populate_range() runs concurrently, it may obtain a reference to an
amdxdna_umap that is being released, leading to a potential use-after-free.

Use kref_get_unless_zero() in aie2_populate_range() when acquiring a
reference. If the reference count has already dropped to zero, release
is in progress and the entry is skipped.

Fixes: e486147c912f ("accel/amdxdna: Add BO import and export")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260706221228.434099-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix VMA access race</title>
<updated>2026-07-07T05:35:30+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-06-09T01:12:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=1ba02717e821cf14ece642273958647e79698d3d'/>
<id>urn:sha1:1ba02717e821cf14ece642273958647e79698d3d</id>
<content type='text'>
aie2_populate_range() and amdxdna_umap_release() access a saved VMA
pointer that may have already been freed, leading to a potential
use-after-free.

Remove the VMA accesses from these functions to avoid the race.

Fixes: e486147c912f ("accel/amdxdna: Add BO import and export")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260609011242.2833740-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Use unsigned long for nr_pages in amdxdna_hmm_register()</title>
<updated>2026-07-07T05:34:56+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-06-16T06:15:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux.git/commit/?id=18aaebdf43366954345a6721ed2bff3ac3c9fa61'/>
<id>urn:sha1:18aaebdf43366954345a6721ed2bff3ac3c9fa61</id>
<content type='text'>
nr_pages is declared as u32 in amdxdna_hmm_register(), which may not be
large enough to represent the number of pages for large mappings.

Use unsigned long for nr_pages to avoid potential overflow.

Fixes: ac49797c1815 ("accel/amdxdna: Add GEM buffer object management")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260616061532.3533469-1-lizhi.hou@amd.com
</content>
</entry>
</feed>
