Repository navigation
watchdog: apple: set the parent device and honour nowayout - #951
Merged
RyanTheTide merged 1 commit intoNov 5, 2026
Merged
RyanTheTide merged 1 commit into
RyanTheTide merged 1 commit into
Conversation
The driver never applies the nowayout policy, so a kernel built with CONFIG_WATCHDOG_NOWAYOUT still lets userspace stop the watchdog with a magic close or WDIOS_DISABLECARD. Apply the Kconfig setting. wdd.parent is also unset, so the watchdog class device has no "device" link in sysfs, a "watchdog" device tree alias on the node is ignored, and the core logs the identity string instead of the device name. Set it to the platform device. This applies to every Apple SoC using the driver. Nothing changes in a kernel built without CONFIG_WATCHDOG_NOWAYOUT beyond the sysfs link and the log prefix. Assisted-by: LLM Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
RyanTheTide
approved these changes
Nov 5, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
Thanks for splitting this out, no more module parameter and it does the right thing.
We tested it in the merge train, integration/aurora 1d76233 plus this PR and 525, 732, 749, 920 and 950, on our M4 Pro (J616s) as a one-shot boot with SELinux enforcing. The watchdog class device now links to 50836c000.watchdog. nowayout reads 0 there because our universal config leaves CONFIG_WATCHDOG_NOWAYOUT off, so nothing changes for systemd on our machines. Boot row same as fleet16, no new AVCs, no failed units. Merging!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Split from #525: this applies to every Apple SoC using the driver. A kernel built with
CONFIG_WATCHDOG_NOWAYOUTstill lets userspace stop the watchdog, and with no parent device the class device has nodevicelink and awatchdogalias is ignored.What
wdd.parentto the platform device.Testing
Kernel is the same merge as #525's proof, built with
CONFIG_WATCHDOG_NOWAYOUT=y, on a J616c:nowayoutreads 1 and systemd uses/dev/watchdog0. On an earlier merge, with the same watchdog code, the class device resolved to theapple-watchdogplatform device. Not tested on another Apple SoC.🤖 Generated with Claude Code