diff options
author | Eric Biggers <[email protected]> | 2024-04-30 19:53:31 -0700 |
---|---|---|
committer | Eric Biggers <[email protected]> | 2024-05-03 08:30:58 -0700 |
commit | ee5814dddefbaa181cb247a75676dd5103775db1 (patch) | |
tree | d84ec395359072947cfec2811c70486c873fc173 /scripts/gcc-plugins/randomize_layout_plugin.c | |
parent | e67572cd2204894179d89bd7b984072f19313b03 (diff) |
fsverity: use register_sysctl_init() to avoid kmemleak warning
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 <[email protected]>
Closes: https://lore.kernel.org/r/CAHj4cs8DTSvR698UE040rs_pX1k-WVe7aR6N2OoXXuhXJPDC-w@mail.gmail.com
Cc: [email protected]
Reviewed-by: Joel Granados <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions