From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] small but important fix for clone2()
Date: Fri, 08 Feb 2002 03:30:35 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590698806024@msgid-missing> (raw)
There is a longstanding and silly bug in clone2() which can lead to
memory corruption. The problem is that when the user-stack area is
specified explicitly (as is the case during pthread creation),
clone2() failed to allocate the scratch space required by the calling
convention. The patch below fixes this.
Thanks to Asit Mallick for tracking this down.
--david
--- arch/ia64/kernel/process.c~ Mon Feb 4 22:38:51 2002
+++ arch/ia64/kernel/process.c Wed Feb 6 21:05:25 2002
@@ -267,7 +267,7 @@
if (user_mode(child_ptregs)) {
if (user_stack_base) {
- child_ptregs->r12 = user_stack_base + user_stack_size;
+ child_ptregs->r12 = user_stack_base + user_stack_size - 16;
child_ptregs->ar_bspstore = user_stack_base;
child_ptregs->ar_rnat = 0;
child_ptregs->loadrs = 0;
next reply other threads:[~2002-02-08 3:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-08 3:30 David Mosberger [this message]
2002-02-09 18:45 ` [Linux-ia64] small but important fix for clone2() David Mosberger
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-105590698806024@msgid-missing \
--to=davidm@hpl.hp.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