From: planck kernel size experiment Subject: netlink: generic netlink back when an in-kernel family needs it 130 omits genetlink.o because the logger's kernel had no generic-netlink family left. nfsd, lockd and the TLS handshake layer each register one (all three come with SUNRPC), and so does ksmbd (SMB_SERVER), which talks to its userland ksmbd.mountd over it: a box with NFSD or SMB_SERVER (the NAS box) failed to link on genl_register_family and genlmsg_put. Build genetlink.o exactly when one of them is built; a box with neither (the svn box, the log box) keeps it out. The socket-destruct counter 130 took out of af_netlink.c stays out: it only paces genl_unregister_family, which a built-in family never calls. diff -u -r a/net/netlink/Makefile b/net/netlink/Makefile --- a/net/netlink/Makefile 2026-10-05 12:05:02.399030746 +0200 +++ b/net/netlink/Makefile 2026-10-06 05:39:42.554623593 +0200 @@ -4,6 +4,10 @@ # obj-y := af_netlink.o policy.o +# planck: generic netlink only when an in-kernel family needs it -- nfsd, lockd and the TLS handshake (all with +# SUNRPC), and ksmbd (SMB_SERVER: its link to ksmbd.mountd) +genetlink-users := $(CONFIG_SUNRPC)$(CONFIG_SMB_SERVER) +obj-$(if $(genetlink-users),y) += genetlink.o obj-$(CONFIG_NETLINK_DIAG) += netlink_diag.o netlink_diag-y := diag.o