When a DAX / ndctl driver is builtin (not a loadable module),
daxctl_insert_kmod_for_mode() and __util_bind() still call
kmod_module_probe_insert_module() unconditionally. libkmod only
short-circuits builtin modules when it can find the modules.builtin
index; otherwise it falls through to init_module() and returns -ENOENT,
surfacing as a spurious "insert failure".
Pre-check kmod_module_get_initstate() and skip probe-insert when the
module is already BUILTIN or LIVE, matching the pattern used by ndctl's
own test/core.c.
Chen Pei (2):
daxctl: fix kmod reference leak on probe-insert failure
daxctl, util/sysfs: skip module probe-insert when driver is builtin or
live
daxctl/lib/libdaxctl.c | 19 +++++++++++++++++--
util/sysfs.c | 17 +++++++++++------
2 files changed, 28 insertions(+), 8 deletions(-)
--
2.43.0