diff options
Diffstat (limited to 'arch/arm/include/asm/syscall.h')
| -rw-r--r-- | arch/arm/include/asm/syscall.h | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index f1d96d4e809..4651f6999b7 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h @@ -7,7 +7,7 @@  #ifndef _ASM_ARM_SYSCALL_H  #define _ASM_ARM_SYSCALL_H -#include <linux/audit.h> /* for AUDIT_ARCH_* */ +#include <uapi/linux/audit.h> /* for AUDIT_ARCH_* */  #include <linux/elf.h> /* for ELF_EM */  #include <linux/err.h>  #include <linux/sched.h> @@ -57,6 +57,9 @@ static inline void syscall_get_arguments(struct task_struct *task,  					 unsigned int i, unsigned int n,  					 unsigned long *args)  { +	if (n == 0) +		return; +  	if (i + n > SYSCALL_MAX_ARGS) {  		unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i;  		unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; @@ -81,6 +84,9 @@ static inline void syscall_set_arguments(struct task_struct *task,  					 unsigned int i, unsigned int n,  					 const unsigned long *args)  { +	if (n == 0) +		return; +  	if (i + n > SYSCALL_MAX_ARGS) {  		pr_warning("%s called with max args %d, handling only %d\n",  			   __func__, i + n, SYSCALL_MAX_ARGS); @@ -97,8 +103,7 @@ static inline void syscall_set_arguments(struct task_struct *task,  	memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0]));  } -static inline int syscall_get_arch(struct task_struct *task, -				   struct pt_regs *regs) +static inline int syscall_get_arch(void)  {  	/* ARM tasks don't change audit architectures on the fly. */  	return AUDIT_ARCH_ARM;  | 
