From: sashiko-bot@kernel.org
To: "Chengyu Liu" <lui2012qwq@gmail.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] accel/habanalabs: disable pending-reset work in hl_device_fini()
Date: Fri, 06 Nov 2026 09:28:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-201108@kernel.org> (raw)
In-Reply-To: <20261104095159.6487-1-lui2012qwq@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] accel/habanalabs: missing Fixes trailer for hl_device_fini()
reset work fix
--
commit e560ec133709db78ecf2c5f01a23a035c9ef7ca3
Author: Chengyu Liu <lui2012qwq@gmail.com>
> accel/habanalabs: disable pending-reset work in hl_device_fini()
>
> hl_device_fini() uses flush_delayed_work() to drain
> device_reset_work.reset_work, but a flush cannot stop the work from
> being armed again afterwards, so the reset work can still fire while -
> or after - the device is torn down.
>
> Simply switching the flush to disable_delayed_work_sync() is not
> enough: a reset retry sitting on its timer holds reset_info.in_reset,
> and only the work itself clears it (via out_err once
> device_fini_pending is set). Killing the work without running it
> strands in_reset, and hl_device_fini() then waits for the full
> HL_HARD_RESET_MAX_TIMEOUT and returns without tearing the device
> down.
>
> So keep the flush first: with device_fini_pending set, a pending
> retry runs immediately and clears in_reset via out_err. Then, after
> in_reset has been claimed for fini - so no new reset can be queued
> and the reset thread does not re-arm - disable the work to guarantee
> nothing is pending or running during the teardown.
>
> Found by static analysis.
>
> Signed-off-by: Chengyu Liu <lui2012qwq@gmail.com>
[Severity: Low]
This fixes the incomplete draining of device_reset_work.reset_work in
hl_device_fini(). Should this include:
Fixes: adb51298fdc4 ("habanalabs: improve hard reset procedure")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104095159.6487-1-lui2012qwq@gmail.com?part=1
next prev parent reply other threads:[~2026-11-06 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 16:33 [PATCH] accel/habanalabs: disable pending-reset work in hl_device_fini() Chengyu Liu
2026-11-04 9:07 ` sashiko-bot
2026-11-04 9:46 ` Chengyu Liu
2026-11-04 9:51 ` [PATCH v2] " Chengyu Liu
2026-11-06 9:28 ` sashiko-bot [this message]
2026-11-06 12:05 ` [PATCH v3] " Chengyu Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-201108@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lui2012qwq@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.