From: Arun Sharma <arun.sharma@intel.com>
To: linux-ia64@vger.kernel.org
Subject: IA-32 support patch: msgsnd/msgrcv return value off by 4
Date: Tue, 24 Jun 2003 22:12:38 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105649278110408@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
The return value of do_sys32_msgsnd() is off by 4. This seems to be a bug inherited from sparc64, fixed in the x86_64 tree in 2.5.
Please apply to both 2.4 and 2.5 trees.
-Arun
[-- Attachment #2: msgrcv.19.txt --]
[-- Type: text/plain, Size: 926 bytes --]
--- linux/arch/ia64/ia32/sys_ia32.c- 2003-06-23 09:30:13.000000000 +0800
+++ linux/arch/ia64/ia32/sys_ia32.c 2003-06-23 09:29:20.000000000 +0800
@@ -2262,7 +2262,7 @@
static int
do_sys32_msgsnd (int first, int second, int third, void *uptr)
{
- struct msgbuf *p = kmalloc(second + sizeof(struct msgbuf) + 4, GFP_USER);
+ struct msgbuf *p = kmalloc(second + sizeof(struct msgbuf), GFP_USER);
struct msgbuf32 *up = (struct msgbuf32 *)uptr;
mm_segment_t old_fs;
int err;
@@ -2304,12 +2304,12 @@
msgtyp = ipck.msgtyp;
}
err = -ENOMEM;
- p = kmalloc(second + sizeof(struct msgbuf) + 4, GFP_USER);
+ p = kmalloc(second + sizeof(struct msgbuf), GFP_USER);
if (!p)
goto out;
old_fs = get_fs();
set_fs(KERNEL_DS);
- err = sys_msgrcv(first, p, second + 4, msgtyp, third);
+ err = sys_msgrcv(first, p, second, msgtyp, third);
set_fs(old_fs);
if (err < 0)
goto free_then_out;
next reply other threads:[~2003-06-24 22:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-24 22:12 Arun Sharma [this message]
2003-06-30 16:30 ` IA-32 support patch: msgsnd/msgrcv return value off by 4 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-105649278110408@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox