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
GitHub <noreply@github.com>Committed on Sep 7 2023, 9:36 PM
Parents
rG95f71c019d7c: Selectable block allocators
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG3602775330b3: Linux 6.5 compat: spl: properly unregister sysctl entries (authored by Andrea Righi <andrea.righi@canonical.com>).Sep 7 2023, 9:36 PM