From: Arun Sharma <arun.sharma@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] IA-32 emulation patch: shmctl.patch
Date: Fri, 23 May 2003 01:46:35 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723705997@msgid-missing> (raw)
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;"
next reply other threads:[~2003-05-23 1:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-23 1:46 Arun Sharma [this message]
2003-05-29 16:18 ` [Linux-ia64] IA-32 emulation patch: shmctl.patch Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590723705997@msgid-missing \
--to=arun.sharma@intel.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.