diff options
-rw-r--r-- | arch/arm64/include/asm/syscall.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h index 89c047f9a971..70ba9d4ee978 100644 --- a/arch/arm64/include/asm/syscall.h +++ b/arch/arm64/include/asm/syscall.h | |||
@@ -59,6 +59,9 @@ static inline void syscall_get_arguments(struct task_struct *task, | |||
59 | unsigned int i, unsigned int n, | 59 | unsigned int i, unsigned int n, |
60 | unsigned long *args) | 60 | unsigned long *args) |
61 | { | 61 | { |
62 | if (n == 0) | ||
63 | return; | ||
64 | |||
62 | if (i + n > SYSCALL_MAX_ARGS) { | 65 | if (i + n > SYSCALL_MAX_ARGS) { |
63 | unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; | 66 | unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; |
64 | unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; | 67 | unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; |
@@ -82,6 +85,9 @@ static inline void syscall_set_arguments(struct task_struct *task, | |||
82 | unsigned int i, unsigned int n, | 85 | unsigned int i, unsigned int n, |
83 | const unsigned long *args) | 86 | const unsigned long *args) |
84 | { | 87 | { |
88 | if (n == 0) | ||
89 | return; | ||
90 | |||
85 | if (i + n > SYSCALL_MAX_ARGS) { | 91 | if (i + n > SYSCALL_MAX_ARGS) { |
86 | pr_warning("%s called with max args %d, handling only %d\n", | 92 | pr_warning("%s called with max args %d, handling only %d\n", |
87 | __func__, i + n, SYSCALL_MAX_ARGS); | 93 | __func__, i + n, SYSCALL_MAX_ARGS); |