summaryrefslogtreecommitdiffstats
path: root/ipc/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/msg.c')
-rw-r--r--ipc/msg.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index abc5826270a6..9de48065c1ac 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -867,8 +867,8 @@ out_unlock1:
867 return err; 867 return err;
868} 868}
869 869
870SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, 870long ksys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz,
871 int, msgflg) 871 int msgflg)
872{ 872{
873 long mtype; 873 long mtype;
874 874
@@ -877,6 +877,12 @@ SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
877 return do_msgsnd(msqid, mtype, msgp->mtext, msgsz, msgflg); 877 return do_msgsnd(msqid, mtype, msgp->mtext, msgsz, msgflg);
878} 878}
879 879
880SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
881 int, msgflg)
882{
883 return ksys_msgsnd(msqid, msgp, msgsz, msgflg);
884}
885
880#ifdef CONFIG_COMPAT 886#ifdef CONFIG_COMPAT
881 887
882struct compat_msgbuf { 888struct compat_msgbuf {
@@ -884,8 +890,8 @@ struct compat_msgbuf {
884 char mtext[1]; 890 char mtext[1];
885}; 891};
886 892
887COMPAT_SYSCALL_DEFINE4(msgsnd, int, msqid, compat_uptr_t, msgp, 893long compat_ksys_msgsnd(int msqid, compat_uptr_t msgp,
888 compat_ssize_t, msgsz, int, msgflg) 894 compat_ssize_t msgsz, int msgflg)
889{ 895{
890 struct compat_msgbuf __user *up = compat_ptr(msgp); 896 struct compat_msgbuf __user *up = compat_ptr(msgp);
891 compat_long_t mtype; 897 compat_long_t mtype;
@@ -894,6 +900,12 @@ COMPAT_SYSCALL_DEFINE4(msgsnd, int, msqid, compat_uptr_t, msgp,
894 return -EFAULT; 900 return -EFAULT;
895 return do_msgsnd(msqid, mtype, up->mtext, (ssize_t)msgsz, msgflg); 901 return do_msgsnd(msqid, mtype, up->mtext, (ssize_t)msgsz, msgflg);
896} 902}
903
904COMPAT_SYSCALL_DEFINE4(msgsnd, int, msqid, compat_uptr_t, msgp,
905 compat_ssize_t, msgsz, int, msgflg)
906{
907 return compat_ksys_msgsnd(msqid, msgp, msgsz, msgflg);
908}
897#endif 909#endif
898 910
899static inline int convert_mode(long *msgtyp, int msgflg) 911static inline int convert_mode(long *msgtyp, int msgflg)