]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/alloc_tag: do not register sysctl interface when CONFIG_SYSCTL=n
authorSuren Baghdasaryan <surenb@google.com>
Sat, 1 Jun 2024 23:38:31 +0000 (16:38 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 15 Jun 2024 17:43:05 +0000 (10:43 -0700)
commitc944bf60c16a65ae812a59fd1b66f6c9e18c91c9
tree0db03ec7f293a7edbcae1b0c21c1fe04952159d2
parent3ab85f4046c12fb773084c2974cd7bbe8a3e2e68
lib/alloc_tag: do not register sysctl interface when CONFIG_SYSCTL=n

Memory allocation profiling is trying to register sysctl interface even
when CONFIG_SYSCTL=n, resulting in proc_do_static_key() being undefined.
Prevent that by skipping sysctl registration for such configurations.

Link: https://lkml.kernel.org/r/20240601233831.617124-1-surenb@google.com
Fixes: 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling")
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405280616.wcOGWJEj-lkp@intel.com/
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Kees Cook <keescook@chromium.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/alloc_tag.c