summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2024-05-01 05:53:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-16 14:47:33 +0300
commitd171c85d74c6fdc84b8082cb034c230b353b8f6a (patch)
tree2c11398aa0164beeb8335545d4d830581095f8cb /fs/proc
parentc5a39f16436a2e4c9528e0bfad8ae914aa79d129 (diff)
downloadlinux-d171c85d74c6fdc84b8082cb034c230b353b8f6a.tar.xz
fsverity: use register_sysctl_init() to avoid kmemleak warning
commit ee5814dddefbaa181cb247a75676dd5103775db1 upstream. Since the fsverity sysctl registration runs as a builtin initcall, there is no corresponding sysctl deregistration and the resulting struct ctl_table_header is not used. This can cause a kmemleak warning just after the system boots up. (A pointer to the ctl_table_header is stored in the fsverity_sysctl_header static variable, which kmemleak should detect; however, the compiler can optimize out that variable.) Avoid the kmemleak warning by using register_sysctl_init() which is intended for use by builtin initcalls and uses kmemleak_not_leak(). Reported-by: Yi Zhang <yi.zhang@redhat.com> Closes: https://lore.kernel.org/r/CAHj4cs8DTSvR698UE040rs_pX1k-WVe7aR6N2OoXXuhXJPDC-w@mail.gmail.com Cc: stable@vger.kernel.org Reviewed-by: Joel Granados <j.granados@samsung.com> Link: https://lore.kernel.org/r/20240501025331.594183-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/proc')
0 files changed, 0 insertions, 0 deletions