mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
ipc: introduce ksys_ipc()/compat_ksys_ipc() for s390
The sys_ipc() and compat_ksys_ipc() functions are meant to only be used from the system call table, not called by another function. Introduce ksys_*() interfaces for this purpose, as we have done for many other system calls. Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> [[email protected]: compile fix for !CONFIG_COMPAT] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
1ecff5ef0a
commit
58fa4a410f
5 changed files with 25 additions and 6 deletions
|
|
@ -17,8 +17,8 @@
|
|||
#include <linux/shm.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
|
||||
unsigned long, third, void __user *, ptr, long, fifth)
|
||||
int ksys_ipc(unsigned int call, int first, unsigned long second,
|
||||
unsigned long third, void __user * ptr, long fifth)
|
||||
{
|
||||
int version, ret;
|
||||
|
||||
|
|
@ -106,6 +106,12 @@ SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
|
|||
return -ENOSYS;
|
||||
}
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
|
||||
unsigned long, third, void __user *, ptr, long, fifth)
|
||||
{
|
||||
return ksys_ipc(call, first, second, third, ptr, fifth);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
|
|
@ -121,8 +127,8 @@ struct compat_ipc_kludge {
|
|||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC
|
||||
COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
|
||||
u32, third, compat_uptr_t, ptr, u32, fifth)
|
||||
int compat_ksys_ipc(u32 call, int first, int second,
|
||||
u32 third, compat_uptr_t ptr, u32 fifth)
|
||||
{
|
||||
int version;
|
||||
u32 pad;
|
||||
|
|
@ -195,5 +201,11 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
|
|||
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
|
||||
u32, third, compat_uptr_t, ptr, u32, fifth)
|
||||
{
|
||||
return compat_ksys_ipc(call, first, second, third, ptr, fifth);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue