Skip to content

Commit 63e2f40

Browse files
committed
syscalls: fix sys_fanotify_mark prototype
My earlier fix missed an incorrect function prototype that shows up on native 32-bit builds: In file included from fs/notify/fanotify/fanotify_user.c:14: include/linux/syscalls.h:248:25: error: conflicting types for 'sys_fanotify_mark'; have 'long int(int, unsigned int, u32, u32, int, const char *)' {aka 'long int(int, unsigned int, unsigned int, unsigned int, int, const char *)'} 1924 | SYSCALL32_DEFINE6(fanotify_mark, | ^~~~~~~~~~~~~~~~~ include/linux/syscalls.h:862:17: note: previous declaration of 'sys_fanotify_mark' with type 'long int(int, unsigned int, u64, int, const char *)' {aka 'long int(int, unsigned int, long long unsigned int, int, const char *)'} On x86 and powerpc, the prototype is also wrong but hidden in an #ifdef, so it never caused problems. Add another alternative declaration that matches the conditional function definition. Fixes: 403f17a ("parisc: use generic sys_fanotify_mark implementation") Cc: stable@vger.kernel.org Reported-by: Guenter Roeck <linux@roeck-us.net> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 7e1f4eb commit 63e2f40

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

include/linux/syscalls.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,15 @@ asmlinkage long sys_prlimit64(pid_t pid, unsigned int resource,
859859
const struct rlimit64 __user *new_rlim,
860860
struct rlimit64 __user *old_rlim);
861861
asmlinkage long sys_fanotify_init(unsigned int flags, unsigned int event_f_flags);
862+
#if defined(CONFIG_ARCH_SPLIT_ARG64)
863+
asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags,
864+
unsigned int mask_1, unsigned int mask_2,
865+
int dfd, const char __user * pathname);
866+
#else
862867
asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags,
863868
u64 mask, int fd,
864869
const char __user *pathname);
870+
#endif
865871
asmlinkage long sys_name_to_handle_at(int dfd, const char __user *name,
866872
struct file_handle __user *handle,
867873
int __user *mnt_id, int flag);

0 commit comments

Comments
 (0)