diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-10-19 09:15:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-10-19 09:15:27 +0200 |
commit | ae79d5588a04aec9dc4b0c6df700d131447306e0 (patch) | |
tree | d0df27fdf5f3b27f4c54dd7dfeab83005ac76f90 /include/linux/security.h | |
parent | d7e78706e43107fa269fe34b1a69e653f5ec9f2c (diff) | |
download | linux-stable-ae79d5588a04aec9dc4b0c6df700d131447306e0.tar.gz linux-stable-ae79d5588a04aec9dc4b0c6df700d131447306e0.tar.bz2 linux-stable-ae79d5588a04aec9dc4b0c6df700d131447306e0.zip |
perf/core: Fix !CONFIG_PERF_EVENTS build warnings and failures
sparc64 runs into this warning:
include/linux/security.h:1913:52: warning: 'struct perf_event' declared inside parameter list will not be visible outside of this definition or declaration
which is escalated to a build error in some of the .c files due to -Werror.
Fix it via a forward declaration, like we do for perf_event_attr, the stub inlines
don't actually need to know the structure of this struct.
Fixes: da97e18458fb: ("perf_event: Add support for LSM and SELinux checks")
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r-- | include/linux/security.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 4df79ffdc3a0..0a86bfea64d0 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -1896,6 +1896,7 @@ static inline void security_bpf_prog_free(struct bpf_prog_aux *aux) #ifdef CONFIG_PERF_EVENTS struct perf_event_attr; +struct perf_event; #ifdef CONFIG_SECURITY extern int security_perf_event_open(struct perf_event_attr *attr, int type); |