public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] IA-32 emulation patch: shmctl.patch
@ 2003-05-23  1:46 Arun Sharma
  2003-05-29 16:18 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Arun Sharma @ 2003-05-23  1:46 UTC (permalink / raw)
  To: linux-ia64

This one is similar to msgctl. We should be calling sys_shmctl with
struct shmid64_ds. 

In the absence of this patch:

shmctl(shmid, IPC_SET, &shmid_ds)

will fail.

	-Arun

diff -burN linux/arch/ia64/ia32/sys_ia32.c linux-changed/arch/ia64/ia32/sys_ia32.c
--- linux/arch/ia64/ia32/sys_ia32.c	2003-04-17 15:43:11.000000000 +0800
+++ linux-changed/arch/ia64/ia32/sys_ia32.c	2003-04-18 11:40:46.000000000 +0800
@@ -2408,7 +2408,7 @@
 shmctl32 (int first, int second, void *uptr)
 {
 	int err = -EFAULT, err2;
-	struct shmid_ds s;
+
 	struct shmid64_ds s64;
 	struct shmid_ds32 *up32 = (struct shmid_ds32 *)uptr;
 	struct shmid64_ds32 *up64 = (struct shmid64_ds32 *)uptr;
@@ -2460,19 +2460,19 @@
 
 	      case IPC_SET:
 		if (version = IPC_64) {
-			err = get_user(s.shm_perm.uid, &up64->shm_perm.uid);
-			err |= get_user(s.shm_perm.gid, &up64->shm_perm.gid);
-			err |= get_user(s.shm_perm.mode, &up64->shm_perm.mode);
+			err = get_user(s64.shm_perm.uid, &up64->shm_perm.uid);
+			err |= get_user(s64.shm_perm.gid, &up64->shm_perm.gid);
+			err |= get_user(s64.shm_perm.mode, &up64->shm_perm.mode);
 		} else {
-			err = get_user(s.shm_perm.uid, &up32->shm_perm.uid);
-			err |= get_user(s.shm_perm.gid, &up32->shm_perm.gid);
-			err |= get_user(s.shm_perm.mode, &up32->shm_perm.mode);
+			err = get_user(s64.shm_perm.uid, &up32->shm_perm.uid);
+			err |= get_user(s64.shm_perm.gid, &up32->shm_perm.gid);
+			err |= get_user(s64.shm_perm.mode, &up32->shm_perm.mode);
 		}
 		if (err)
 			break;
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
-		err = sys_shmctl(first, second, &s);
+		err = sys_shmctl(first, second, &s64);
 		set_fs(old_fs);
 		break;"



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-29 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-23  1:46 [Linux-ia64] IA-32 emulation patch: shmctl.patch Arun Sharma
2003-05-29 16:18 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox