diff --git a/ipc/shm.c b/ipc/shm.c index 1b3adfe3c60e259e7366aa76a23b14e7c1a173b5..1e2b1692ba2c6a3a9f4d03c1120334facdb446cf 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -1237,7 +1237,7 @@ COMPAT_SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, void __user *, uptr) err = shmctl_stat(ns, shmid, cmd, &sem64); if (err < 0) return err; - if (copy_compat_shmid_to_user(&sem64, uptr, version)) + if (copy_compat_shmid_to_user(uptr, &sem64, version)) err = -EFAULT; return err;