From: Andrew Morton <akpm@osdl.org>
To: davem@davemloft.net, linux-arch@vger.kernel.org
Subject: Re: x86-64-waitid-compat-fix
Date: Mon, 20 Sep 2004 20:46:37 -0700 [thread overview]
Message-ID: <20040920204637.441097b6.akpm@osdl.org> (raw)
In-Reply-To: <20040920204055.577976a9.akpm@osdl.org>
Andrew Morton <akpm@osdl.org> wrote:
>
> I guess I'll merge this into Linus's tree this evening. It breaks sparc64
> and probably other architectures. The fix will be simple; probably the
> same as x86_64..
This sparc64 fix compiles.
All (or most of) those casts in the sys_waitid() call seem to be unneeded -
we have a prototype in scope...
--- 25-sparc64/arch/sparc64/kernel/sys_sparc32.c~sparc64-waitid-compat-fix 2004-09-20 20:41:25.867863424 -0700
+++ 25-sparc64-akpm/arch/sparc64/kernel/sys_sparc32.c 2004-09-20 20:44:59.847333600 -0700
@@ -1737,21 +1737,28 @@ sys32_timer_create(u32 clock, struct sig
}
asmlinkage long compat_sys_waitid(u32 which, u32 pid,
- struct siginfo32 __user *uinfo, u32 options)
+ struct siginfo32 __user *uinfo, int options,
+ struct compat_rusage __user *uru)
{
siginfo_t info;
+ struct rusage ru;
long ret;
mm_segment_t old_fs = get_fs();
memset(&info, 0, sizeof(info));
- set_fs (KERNEL_DS);
- ret = sys_waitid((int)which, (compat_pid_t) pid,
- (siginfo_t __user *) &info, (int) options);
- set_fs (old_fs);
+ set_fs(KERNEL_DS);
+ ret = sys_waitid((int)which, (compat_pid_t)pid,
+ (siginfo_t __user *)&info, (int)options,
+ uru ? &ru : NULL);
+
+ set_fs(old_fs);
if (ret < 0 || info.si_signo == 0)
return ret;
+ if (uru && (ret = put_compat_rusage(&ru, uru)))
+ return ret;
+
BUG_ON(info.si_code & __SI_MASK);
info.si_code |= __SI_CHLD;
return copy_siginfo_to_user32(uinfo, &info);
_
next prev parent reply other threads:[~2004-09-21 3:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-21 3:40 x86-64-waitid-compat-fix Andrew Morton
2004-09-21 3:46 ` Andrew Morton [this message]
2004-09-21 6:17 ` x86-64-waitid-compat-fix David S. Miller
2004-09-21 8:54 ` x86-64-waitid-compat-fix Andi Kleen
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=20040920204637.441097b6.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=linux-arch@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