[Devel] Re: [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment
Oren Laadan
orenl at cs.columbia.edu
Mon Jun 14 19:55:45 PDT 2010
Applied in ckpt-v22-dev (will be pushed soon)
Thanks,
Oren.
On 05/03/2010 10:04 PM, Sukadev Bhattiprolu wrote:
>
> Sorry, I thought I had sent this minor patch out earlier, but I just
> realized I had not.
> ---
>
> From: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
> 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 at linux.vnet.ibm.com>
> ---
> 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;
>
>
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list