Linux CXL
 help / color / mirror / Atom feed
* [ndctl PATCH 0/2] daxctl, util/sysfs: fix builtin-driver false failure on enable
@ 2026-05-14  6:32 Chen Pei
  2026-05-14  6:32 ` [ndctl PATCH 1/2] daxctl: fix kmod reference leak on probe-insert failure Chen Pei
  2026-05-14  6:32 ` [ndctl PATCH 2/2] daxctl, util/sysfs: skip module probe-insert when driver is builtin or live Chen Pei
  0 siblings, 2 replies; 6+ messages in thread
From: Chen Pei @ 2026-05-14  6:32 UTC (permalink / raw)
  To: alison.schofield, nvdimm; +Cc: linux-cxl, guoren, Chen Pei

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-14 18:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  6:32 [ndctl PATCH 0/2] daxctl, util/sysfs: fix builtin-driver false failure on enable Chen Pei
2026-05-14  6:32 ` [ndctl PATCH 1/2] daxctl: fix kmod reference leak on probe-insert failure Chen Pei
2026-05-14 17:16   ` Dave Jiang
2026-05-14  6:32 ` [ndctl PATCH 2/2] daxctl, util/sysfs: skip module probe-insert when driver is builtin or live Chen Pei
2026-05-14 17:17   ` Dave Jiang
2026-05-14 18:37   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox