[PATCH 0/5] watchdog: Set missing .owner = THIS_MODULE in watchdog_ops

From: Ian Rogers

Date: Mon Nov 30 2026 - 17:54:22 EST


watchdog_open() calls try_module_get(wdd->ops->owner) so a modular
watchdog driver cannot be unloaded while /dev/watchdog is open. Five
modular watchdog drivers omit .owner = THIS_MODULE in their const struct
watchdog_ops definitions, leaving wdd->ops->owner NULL.

Split per driver to simplify review and stable backporting.

Tooling note: Found using Clang's require_explicit_initialization
attribute; an AI coding assistant helped audit call sites, verify Fixes
commits, and draft the changelogs. All five drivers were build-tested as
modules (-DMODULE) with LLVM=1.

Ian Rogers (5):
watchdog: arm_smc_wdt: Set .owner = THIS_MODULE in watchdog_ops
watchdog: bd96801_wdt: Set .owner = THIS_MODULE in watchdog_ops
watchdog: ebc-c384_wdt: Set .owner = THIS_MODULE in watchdog_ops
watchdog: max77620: Set .owner = THIS_MODULE in watchdog_ops
watchdog: meson_gxbb_wdt: Set .owner = THIS_MODULE in watchdog_ops

drivers/watchdog/arm_smc_wdt.c | 2 ++
drivers/watchdog/bd96801_wdt.c | 1 +
drivers/watchdog/ebc-c384_wdt.c | 1 +
drivers/watchdog/max77620_wdt.c | 1 +
drivers/watchdog/meson_gxbb_wdt.c | 1 +
5 files changed, 6 insertions(+)


base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
--
2.56.1.839.g22a8290db9-goog