aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-10-10 22:46:22 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-10-10 22:46:22 +0000
commitf3ea244ea9ba4674d3f08539b7a3abdc52abbcdd (patch)
treed5f39be8567f7052ae1e7394a9a8eddd3cebb86e /sys
parent7f4c1dd0d6165a6d15c7064d004759dc69d738ec (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_ipc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 1413c474b750..6cc27d19273d 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -628,13 +628,14 @@ linux_msgctl(struct thread *td, struct linux_msgctl_args *args)
struct l_msqid_ds linux_msqid;
struct msqid_ds bsd_msqid;
- error = linux_msqid_pullup(args->cmd & LINUX_IPC_64,
- &linux_msqid, PTRIN(args->buf));
- if (error != 0)
- return (error);
bsd_cmd = args->cmd & ~LINUX_IPC_64;
- if (bsd_cmd == LINUX_IPC_SET)
+ if (bsd_cmd == LINUX_IPC_SET) {
+ error = linux_msqid_pullup(args->cmd & LINUX_IPC_64,
+ &linux_msqid, PTRIN(args->buf));
+ if (error)
+ return (error);
linux_to_bsd_msqid_ds(&linux_msqid, &bsd_msqid);
+ }
error = kern_msgctl(td, args->msqid, bsd_cmd, &bsd_msqid);
if (error != 0)