Skip to content

Report the nodes after their friends, on the hot-plug worker - #69

Merged
JohnAmadis merged 1 commit into
mainfrom
fix/report-after-friends
Oct 11, 2026
Merged

JohnAmadis merged 1 commit into
mainfrom
fix/report-after-friends

Conversation

@JaxCalder

Copy link
Copy Markdown
Contributor

Summary

A node was probed for its classes as soon as its path was known, before its friends_group was broadcast. A driver that answers the probe through a friend could not answer. dmwm8994 answers DMDRVI_IOCTL_AUDIO_GET_INFO over its I2C bus friend, so the probe failed and the codec was never reported as audio. As a result libsystemd started no dmaudio@wm8994 for it.

Changes:

  • The nodes are reported (report_node_ready()) after the friends are broadcast: at mount, for a configuration added to a mounted instance, and for hot-plugged nodes.
  • The nodes a mount has when it becomes ready are reported by the hot-plug worker (process_mount_ready()), not in dmfsi_dmdevfs_mounted(). dmod-boot mounts /dev before the scheduler runs. A probe that now talks to the hardware waits for the I2C transfer, and waiting there corrupted the context: the board stopped with "Stack overflow detected in task: dmdevfs_hotplug". The partitions are scanned on the worker as well, after the report. A node a hot-plug event reported earlier is skipped.

Testing

  • Host tests: 9/9 pass. No new test was added: the mock driver has no probe that needs a friend.
  • STM32F746G-DISCO with the WM8994 (codec-with-touch.ini): the codec is reported as audio and dmaudio@wm8994 starts from its rule (choco-technologies/dmaudio, libdmaudio). The SD card is still automounted, and the display, touch, network and console work. The peak stack use of dmdevfs_hotplug is unchanged (2468/4608).

🤖 Generated with Claude Code

A node was probed for its classes as soon as its path was known - before
its friends_group was broadcast, so a driver that answers the probe
through a friend could not: dmwm8994 answers DMDRVI_IOCTL_AUDIO_GET_INFO
over its I2C bus friend, failed, and the codec was never reported as
"audio" (no dmaudio@ service for it).

The nodes are now reported after the friends are broadcast. The nodes a
mount has when it becomes ready are reported by the hot-plug worker
(process_mount_ready()), not in dmfsi_dmdevfs_mounted(): dmod-boot mounts
/dev before the scheduler runs, and a probe that now talks to the hardware
waits - which there corrupted the context ("stack overflow" of
dmdevfs_hotplug). Their partitions are scanned there too, after the
report, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JohnAmadis
JohnAmadis merged commit 532288e into main Oct 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants