Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] accel/qaic: missing Fixes trailer for commit d48ea8691943 in
  qaic_wait_bo_ioctl()
--

commit 24be64e6b07142c24440e91100eb34ff1186347a
Author: Bilal Hashim <[email protected]>

> accel/qaic: Hold bo->lock when checking bo->sliced and bo->dbc in 
> qaic_wait_bo_ioctl()
>
> In `qaic_wait_bo_ioctl()`, `bo->sliced` and `bo->dbc->id` are read
> without holding `bo->lock`.
>
> Concurrently, `qaic_detach_slice_bo_ioctl()` calls `detach_slice_bo()`,
> which invokes `qaic_unprepare_bo()` (setting `bo->dbc = NULL`) before
> `qaic_init_bo(bo, true)` clears `bo->sliced = false`. A thread in
> `qaic_wait_bo_ioctl()` can observe `bo->sliced == true` and then
> dereference `bo->dbc->id` after `bo->dbc` has been cleared to `NULL`,
> triggering a NULL pointer dereference.
>
> Look up the GEM object and validate `bo->sliced` and `bo->dbc->id` under
> `bo->lock` before acquiring `dbc->ch_lock` (preserving lock ordering
> with `qaic_attach_slice_bo_ioctl()` and `qaic_detach_slice_bo_ioctl()`),
> then release `bo->lock` before sleeping in
> `wait_for_completion_interruptible_timeout()`.
>
> Found by manual code inspection.
>
> Signed-off-by: Bilal Hashim <[email protected]>

[Severity: Low]
This fixes the unlocked checks of bo->sliced and bo->dbc->id added in
qaic_wait_bo_ioctl() by commit d48ea8691943 ("accel/qaic: Harden checks in
BO execute and wait IOCTLs").  Should this include:

  Fixes: d48ea8691943 ("accel/qaic: Harden checks in BO execute and wait 
IOCTLs")

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to