Skip to content

Commit

Permalink
audit: fix build error when asm/syscall.h does not exist
Browse files Browse the repository at this point in the history
avr32 does not have an asm/syscall.h file.  We need the
syscall_get_arch() definition from that file for all arch's which
support CONFIG_AUDITSYSCALL.  Obviously avr32 is not one of those
arch's.  Move the include inside the CONFIG_AUDITSYSCALL such that we
only do the include if we need the results.

When the syscall_get_arch() call is moved inside __audit_syscall_entry()
this include can be dropped entirely.  But that is going to require some
assembly changes on x86* in a patch that is not ready for the tree...

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
  • Loading branch information
Eric Paris committed Sep 23, 2014
1 parent 84db564 commit a9ebe0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <uapi/linux/audit.h>
#include <asm/syscall.h>

struct audit_sig_info {
uid_t uid;
Expand Down Expand Up @@ -110,6 +109,8 @@ extern void audit_log_session_info(struct audit_buffer *ab);
#endif

#ifdef CONFIG_AUDITSYSCALL
#include <asm/syscall.h> /* for syscall_get_arch() */

/* These are defined in auditsc.c */
/* Public API */
extern int audit_alloc(struct task_struct *task);
Expand Down

0 comments on commit a9ebe0b

Please sign in to comment.