patches/driver/bes2600/queue-pending-record-lock-bh-danctnix: mirror besser#18 fix #30

Merged
marfrit merged 1 commits from claude-noether/kernel-agent:noether/bes2600-pending-record-lock-bh into main 2026-05-18 19:18:52 +00:00
Owner

Mirror of besser#18 fix

In-tree variant (paths under drivers/staging/bes2600/) of the fix authored by Markus on marfrit/bes2600-dkms branch bes2600/queue-pending-record-lock-bh-fix, commit d95453c (PR #11 there).

Fix: convert plain spin_lock(&pending_record_lock) to spin_lock_bh() at the 5 sites where it's taken in non-BH-disabled contexts (queue.c:832/839/844, tx_loop.c:112/114). queue.c:289/295 stays as plain spin_lock because BH is already disabled by the outer queue->lock_bh acquired at queue.c:285.

Splat being fixed (besser#18)

WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
kworker/u16:1 is trying to acquire:
  &hw_priv->tx_loop.pending_record_lock at bes2600_queue_clear+0x80
and this task is already holding:
  &queue->lock at bes2600_queue_clear+0x60

The AB-BA window is between bes2600_join_work workqueue context (takes pending_record_lock plain) and bes2600_tx softirq context (takes queue->lock with _bh, then can nest pending_record_lock via queue.c:289).

What this PR does

  1. Adds patches/driver/bes2600/queue-pending-record-lock-bh-danctnix/ with:

    • 0001-bes2600-take-pending-record-lock-with-bh.patch (the in-tree variant of d95453c, paths rewritten via sed from bes2600/ to drivers/staging/bes2600/)
    • README.md (one-liner referring to source-of-truth PR)
  2. Does NOT yet add the series to fleet/ohm.yaml — that comes in a follow-up commit once #28 (the migration PR) lands and #11 on bes2600-dkms is reviewed.

Ship path

  • This series-dir will be added to fleet/ohm.yaml includes: after PR #28 (the migration) lands.
  • marfrit-packages will bump to pkgrel=5 after the ohm.yaml update.
  • B18 Phase 7 verification: one-off PROVE_LOCKING-debug build via the new pipeline, install on ohm, run uptime >= 5140s (matches besser#18 spontaneous-fire baseline), assert splat = 0.

References

  • besser#18 (the bug)
  • marfrit/bes2600-dkms#11 (source-of-truth PR)
  • #28 (migration PR; this PR sits on top of it conceptually but is independent so reviews can land in any order)
## Mirror of besser#18 fix In-tree variant (paths under `drivers/staging/bes2600/`) of the fix authored by Markus on `marfrit/bes2600-dkms` branch `bes2600/queue-pending-record-lock-bh-fix`, commit `d95453c` (PR #11 there). Fix: convert plain `spin_lock(&pending_record_lock)` to `spin_lock_bh()` at the 5 sites where it's taken in non-BH-disabled contexts (`queue.c:832/839/844`, `tx_loop.c:112/114`). `queue.c:289/295` stays as plain `spin_lock` because BH is already disabled by the outer `queue->lock_bh` acquired at `queue.c:285`. ## Splat being fixed (besser#18) ``` WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected kworker/u16:1 is trying to acquire: &hw_priv->tx_loop.pending_record_lock at bes2600_queue_clear+0x80 and this task is already holding: &queue->lock at bes2600_queue_clear+0x60 ``` The AB-BA window is between `bes2600_join_work` workqueue context (takes `pending_record_lock` plain) and `bes2600_tx` softirq context (takes `queue->lock` with `_bh`, then can nest `pending_record_lock` via `queue.c:289`). ## What this PR does 1. Adds `patches/driver/bes2600/queue-pending-record-lock-bh-danctnix/` with: - `0001-bes2600-take-pending-record-lock-with-bh.patch` (the in-tree variant of d95453c, paths rewritten via `sed` from `bes2600/` to `drivers/staging/bes2600/`) - `README.md` (one-liner referring to source-of-truth PR) 2. Does NOT yet add the series to `fleet/ohm.yaml` — that comes in a follow-up commit once #28 (the migration PR) lands and #11 on bes2600-dkms is reviewed. ## Ship path - This series-dir will be added to `fleet/ohm.yaml` `includes:` after PR #28 (the migration) lands. - `marfrit-packages` will bump to pkgrel=5 after the ohm.yaml update. - B18 Phase 7 verification: one-off PROVE_LOCKING-debug build via the new pipeline, install on ohm, run uptime >= 5140s (matches besser#18 spontaneous-fire baseline), assert splat = 0. ## References - besser#18 (the bug) - marfrit/bes2600-dkms#11 (source-of-truth PR) - #28 (migration PR; this PR sits on top of it conceptually but is independent so reviews can land in any order)
marfrit added 1 commit 2026-05-18 15:00:32 +00:00
Single-patch series-dir, mirror of the Markus-authored commit d95453c
on marfrit/bes2600-dkms branch bes2600/queue-pending-record-lock-bh-fix
(PR #11). Paths rewritten from DKMS-style (bes2600/foo.c) to in-tree
staging (drivers/staging/bes2600/foo.c) via sed -- this is the
in-tree variant.

Fix: convert plain spin_lock(&pending_record_lock) to spin_lock_bh()
at the 5 sites where it's taken in non-BH-disabled contexts
(queue.c:832/839/844, tx_loop.c:112/114). queue.c:289/295 stays as
plain spin_lock because BH is already disabled by the outer
queue->lock_bh acquired at queue.c:285.

Eliminates the SOFTIRQ-safe -> SOFTIRQ-unsafe lockdep warning
reported in besser#18 (PROVE_LOCKING-only -- non-fatal on production
builds where lockdep is off, but real AB-BA window between
bes2600_join_work workqueue context and bes2600_tx softirq context).

This commit does NOT add the include to fleet/ohm.yaml. The patch
will be wired into ohm's manifest in a follow-up commit (or this
branch's PR can extend with the ohm.yaml change once the migration
PR #28 lands and the bes2600-dkms PR #11 is reviewed).

Closes: besser#18
Refs: marfrit/bes2600-dkms #11 (source-of-truth PR)
marfrit merged commit 3d10a2c21a into main 2026-05-18 19:18:52 +00:00
Sign in to join this conversation.