Skip to content

Bring includes in linux/kmod.h up to date

Petr Pavlu bridge cgroups drbd-dev dri-devel driver-core keyrings linux-acpi linux-block linux-edac linux-fbdev linux-fsdevel linux-modules linux-nfs linux-pm linux-security-module linuxppc-dev lkml netdev ocfs2-devel 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20260816-module-include-kmod-14d1a0e19462

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v23 patches 2 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Rebase on top of v7.3-rc2.
- Clean up commit descriptions.
- Link to v2: https://patch.msgid.link/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3umh, treewide: Explicitly include linux/umh.h where neededarch/x86/kernel/cpu/mce/dev-mcelog.c drivers/block/drbd/drbd_nl.c drivers/greybus/svc_watchdog.c +17 more+20 -131 reply
2/3time/jiffies: Include linux/sysctl.h for proc_int_u2k_conv_uop(), ...kernel/time/jiffies.c+1 -00 replies
3/3module: Bring includes in linux/kmod.h up to dateinclude/linux/kmod.h+2 -100 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchThomas GleixnerAaron TomlinAlex Elder
1/3A-b
2/3A-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/3] Bring includes in linux/kmod.h up to date

The usermode helper declarations were previously provided by linux/kmod.h but commit c1f3fa2a4fde ("kmod: split off umh headers into its own file") moved them to linux/umh.h in 2017. Add explicit includes of linux/umh.h to files that use usermode helpers and remove linux/kmod.h where it is no longer needed.

Also add a missing include of linux/sysctl.h to kernel/time/jiffies.c.

Finally, clean up linux/kmod.h so that it includes only the headers that it actually requires, importantly removing the compat linux/umh.h include.

This cleanup is motivated by trying to reduce the preprocessed size of linux/module.h, which includes linux/kmod.h. linux/module.h appears in roughly 15k #include directives across the kernel. This makes it a "hot" header, so it should avoid pulling in unnecessary definitions. Note that this series doesn't immediately improve the situation, since most of the files included by linux/kmod.h are, for now, also included by linux/module.h through other paths.

Apologies for the wide distribution. Acked-bys are appreciated.

---
Changes in v3:
- Rebase on top of v7.3-rc2.
- Clean up commit descriptions.
- Link to v2: https://patch.msgid.link/[email protected]

Changes in v2:
- Remove the linux/kmod.h include from kernel/cgroup/cgroup-v1.c.
- Add a missing include of linux/sysctl.h to kernel/time/jiffies.c.
- Link to v1: https://patch.msgid.link/[email protected]

---
Petr Pavlu (3):
umh, treewide: Explicitly include linux/umh.h where needed time/jiffies: Include linux/sysctl.h for proc_int_u2k_conv_uop(), ...
module: Bring includes in linux/kmod.h up to date

 arch/x86/kernel/cpu/mce/dev-mcelog.c |  2 +-
 drivers/block/drbd/drbd_nl.c         |  1 +
 drivers/greybus/svc_watchdog.c       |  1 +
 drivers/macintosh/windfarm_core.c    |  1 +
 drivers/pnp/pnpbios/core.c           |  2 +-
 drivers/video/fbdev/uvesafb.c        |  1 +
 fs/coredump.c                        |  2 +-
 fs/nfs/cache_lib.c                   |  2 +-
 fs/nfsd/nfs4layouts.c                |  2 +-
 fs/nfsd/nfs4recover.c                |  1 +
 fs/ocfs2/stackglue.c                 |  1 +
 include/linux/kmod.h                 | 12 ++----------
 kernel/cgroup/cgroup-v1.c            |  2 +-
 kernel/module/kmod.c                 |  1 +
 kernel/power/process.c               |  2 +-
 kernel/reboot.c                      |  2 +-
 kernel/time/jiffies.c                |  1 +
 kernel/umh.c                         |  2 +-
 lib/kobject_uevent.c                 |  2 +-
 net/bridge/br_stp_if.c               |  2 +-
 security/keys/request_key.c          |  2 +-
 security/tomoyo/common.h             |  2 +-
 22 files changed, 23 insertions(+), 23 deletions(-)

---
base-commit: df2908090cda368b01ff43709f51890076c56157
change-id: 20260816-module-include-kmod-14d1a0e19462