HomeFreeBSD

Linux 6.5 compat: spl: properly unregister sysctl entries

Description

Linux 6.5 compat: spl: properly unregister sysctl entries

When register_sysctl_table() is unavailable we fail to properly
unregister sysctl entries under "kernel/spl".

This leads to errors like the following when spl is unloaded/reloaded,
making impossible to properly reload the spl module:

[ 746.995704] sysctl duplicate entry: /kernel/spl/kmem/slab_kvmem_total

Fix by cleaning up all the sub-entries inside "kernel/spl" when the
spl module is unloaded.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Closes #15239

Details

Provenance
Andrea Righi <andrea.righi@canonical.com>Authored on Sep 7 2023, 9:36 PM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 11 2023, 11:34 PM
Parents
rGcb28c0b7701e: Linux 6.5 compat: safe cleanup in spl_proc_fini()
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGadf428cbef2b: Linux 6.5 compat: spl: properly unregister sysctl entries (authored by Andrea Righi <andrea.righi@canonical.com>).Sep 11 2023, 11:34 PM