]> git.baikalelectronics.ru Git - kernel.git/commit
audit: Move audit_log_task declaration under CONFIG_AUDITSYSCALL
authorJiri Olsa <jolsa@kernel.org>
Thu, 21 Nov 2019 15:58:53 +0000 (16:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Nov 2019 20:14:49 +0000 (12:14 -0800)
commitbea795c054915f450f1fb17d829e26bc44630074
treea7ebc80127a1ec2b54d047aa8d37b76cbcba3b32
parent1e6331925d3e66378efe8fe132f933649cdbe11d
audit: Move audit_log_task declaration under CONFIG_AUDITSYSCALL

The 0-DAY found that audit_log_task is not declared under
CONFIG_AUDITSYSCALL which causes compilation error when
it is not defined:

    kernel/bpf/syscall.o: In function `bpf_audit_prog.isra.30':
 >> syscall.c:(.text+0x860): undefined reference to `audit_log_task'

Adding the audit_log_task declaration and stub within
CONFIG_AUDITSYSCALL ifdef.

Fixes: d4a295fbf279 ("bpf: Emit audit messages upon successful prog load and unload")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/audit.h