diff options
| author | fvdl <fvdl@NetBSD.org> | 1995-03-08 17:27:42 +0000 |
|---|---|---|
| committer | fvdl <fvdl@NetBSD.org> | 1995-03-08 17:27:42 +0000 |
| commit | 9e7e8cd294cf8bd6102e336e92b3f9b4e7f09842 (patch) | |
| tree | 04e4632d886a51c7a38f5fc07fd3836698a46232 /sys/compat/linux/linux_ipc.c | |
| parent | d61b2703ef7b5ba3a2336c431e23f653983dde33 (diff) | |
Add missing structure conversion for IPC_RMID.
Diffstat (limited to 'sys/compat/linux/linux_ipc.c')
| -rw-r--r-- | sys/compat/linux/linux_ipc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 7d6bc4da902..cfa5b3159da 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipc.c,v 1.1 1995/02/28 23:25:03 fvdl Exp $ */ +/* $NetBSD: linux_ipc.c,v 1.2 1995/03/08 17:27:42 fvdl Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -481,7 +481,15 @@ linux_shmctl(p, uap, retval) SCARG(&bsa, cmd) = SHM_UNLOCK; break; } - SCARG(&bsa, buf) = (struct shmid_ds *) SCARG(uap, ptr); + if ((error = copyin(SCARG(uap, ptr), (caddr_t) &lseg, + sizeof lseg))) + return error; + linux_to_bsd_shmid_ds(&lseg, &bs); + sg = stackgap_init(); + bsp = stackgap_alloc(&sg, sizeof (struct shmid_ds)); + if ((error = copyout((caddr_t) &bs, (caddr_t) bsp, sizeof bs))) + return error; + SCARG(&bsa, buf) = bsp; return shmctl(p, &bsa, retval); case LINUX_IPC_INFO: case LINUX_SHM_STAT: |
