From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
christofferdall-77OGu6e99YhyO3AAkE1OcX9LOBIZ5rWg@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org
Subject: [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment
Date: Mon, 3 May 2010 19:04:39 -0700 [thread overview]
Message-ID: <20100504020439.GA5098@us.ibm.com> (raw)
Sorry, I thought I had sent this minor patch out earlier, but I just
realized I had not.
---
From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date: Mon, 3 May 2010 11:38:16 -0700
Subject: [PATCH 1/1] eclone(): Remove extra __user and add a comment
As pointed out by Russel King, '__user' does not make sense on an integer
type. Remove it. Also add a comment on why we want 'stack_size' to be 0
on x86 and s390.
Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
arch/s390/kernel/process.c | 5 ++++-
arch/x86/kernel/process.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index efc7e8a..b00ffad 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -276,7 +276,7 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
int __user *parent_tid_ptr;
int __user *child_tid_ptr;
unsigned long flags;
- unsigned long __user child_stack;
+ unsigned long child_stack;
unsigned long stack_size;
rc = fetch_clone_args_from_user(uca, args_size, &kca);
@@ -288,6 +288,9 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
child_tid_ptr = (int __user *) kca.child_tid_ptr;
stack_size = (unsigned long) kca.child_stack_size;
+ /*
+ * s390 does not need/use the stack_size. Ensure it is unused.
+ */
if (stack_size)
return -EINVAL;
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 5abad20..8b1699a 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -268,7 +268,7 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
unsigned long flags;
int __user *parent_tidp;
int __user *child_tidp;
- unsigned long __user stack;
+ unsigned long stack;
unsigned long stack_size;
rc = fetch_clone_args_from_user(uca, args_size, &kca);
@@ -286,6 +286,9 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
parent_tidp = (int *)(unsigned long)kca.parent_tid_ptr;
child_tidp = (int *)(unsigned long)kca.child_tid_ptr;
+ /*
+ * x86 does not need/use the stack_size. Ensure it is unused.
+ */
stack_size = (unsigned long)kca.child_stack_size;
if (stack_size)
return -EINVAL;
next reply other threads:[~2010-05-04 2:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 2:04 Sukadev Bhattiprolu [this message]
[not found] ` <20100504020439.GA5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-06-15 2:55 ` [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment Oren Laadan
[not found] ` <4C16EBB1.7000806-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-06-15 22:43 ` Sukadev Bhattiprolu
[not found] ` <20100615224353.GA4985-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-06-16 19:36 ` Oren Laadan
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=20100504020439.GA5098@us.ibm.com \
--to=sukadev-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=christofferdall-77OGu6e99YhyO3AAkE1OcX9LOBIZ5rWg@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.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.