From: Alex Dowad <alexinbeijing@gmail.com>
To: linux-kernel@vget.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Rik van Riel <riel@redhat.com>,
Vladimir Davydov <vdavydov@parallels.com>,
Thomas Gleixner <tglx@linutronix.de>,
David Rientjes <rientjes@google.com>,
Kees Cook <keescook@chromium.org>,
Aaron Tomlin <atomlin@redhat.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 01/32] do_fork(): Rename 'stack_size' argument to reflect actual use
Date: Fri, 13 Mar 2015 20:04:16 +0200 [thread overview]
Message-ID: <1426269888-25600-1-git-send-email-alexinbeijing@gmail.com> (raw)
The 'stack_size' argument is never used to pass a stack size. It's only used when
forking a kernel thread, in which case it is an argument which should be passed
to the 'main' function which the kernel thread executes. Hence, rename it to
'kthread_arg'.
Signed-off-by: Alex Dowad <alexinbeijing@gmail.com>
---
Hi,
The following patches in this series perform a similar cleanup for the arch-specific
implementations of copy_thread(). Each patch has been sent to the maintainers for
the relevant arch.
Thanks, AD
kernel/fork.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index cf65139..5a40dfd 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1186,10 +1186,12 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
* It copies the registers, and all the appropriate
* parts of the process environment (as per the clone
* flags). The actual kick-off is left to the caller.
*/
static struct task_struct *copy_process(unsigned long clone_flags,
unsigned long stack_start,
- unsigned long stack_size,
+ unsigned long kthread_arg,
int __user *child_tidptr,
struct pid *pid,
int trace)
@@ -1401,7 +1403,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
retval = copy_io(clone_flags, p);
if (retval)
goto bad_fork_cleanup_namespaces;
- retval = copy_thread(clone_flags, stack_start, stack_size, p);
+ retval = copy_thread(clone_flags, stack_start, kthread_arg, p);
if (retval)
goto bad_fork_cleanup_io;
@@ -1630,7 +1632,7 @@ struct task_struct *fork_idle(int cpu)
*/
long do_fork(unsigned long clone_flags,
unsigned long stack_start,
- unsigned long stack_size,
+ unsigned long kthread_arg,
int __user *parent_tidptr,
int __user *child_tidptr)
{
@@ -1656,7 +1658,7 @@ long do_fork(unsigned long clone_flags,
trace = 0;
}
- p = copy_process(clone_flags, stack_start, stack_size,
+ p = copy_process(clone_flags, stack_start, kthread_arg,
child_tidptr, NULL, trace);
/*
* Do this prior waking up the new thread - the thread pointer
@@ -1740,7 +1742,7 @@ SYSCALL_DEFINE5(clone, unsigned long, newsp, unsigned long, clone_flags,
int, tls_val)
#elif defined(CONFIG_CLONE_BACKWARDS3)
SYSCALL_DEFINE6(clone, unsigned long, clone_flags, unsigned long, newsp,
- int, stack_size,
+ int, ignored,
int __user *, parent_tidptr,
int __user *, child_tidptr,
int, tls_val)
--
2.0.0.GIT
next reply other threads:[~2015-03-13 18:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 18:04 Alex Dowad [this message]
2015-03-13 18:04 ` [PATCH 02/32] alpha: copy_thread(): rename 'arg' argument to 'kthread_arg' Alex Dowad
2015-03-13 18:04 ` [PATCH 03/32] arc: " Alex Dowad
2015-03-25 11:47 ` Vineet Gupta
2015-03-25 12:34 ` Alex Dowad
2015-03-25 12:37 ` Vineet Gupta
2015-03-13 18:04 ` [PATCH 04/32] arm: copy_thread(): rename 'stk_sz' " Alex Dowad
2015-03-13 18:04 ` [PATCH 05/32] arm64: " Alex Dowad
2015-03-13 18:04 ` [PATCH 06/32] avr32: copy_thread(): rename 'arg' " Alex Dowad
2015-03-16 7:03 ` Hans-Christian Egtvedt
2015-03-16 8:18 ` [PATCHv2 " Alex Dowad
2015-03-16 9:52 ` Hans-Christian Egtvedt
2015-03-13 18:04 ` [PATCH 07/32] blackfin: copy_thread(): rename 'topstk' " Alex Dowad
2015-03-13 18:04 ` [PATCH 08/32] c6x: copy_thread(): rename 'ustk_size' " Alex Dowad
2015-03-13 18:04 ` [PATCH 09/32] cris/arch-v10: copy_thread(): rename 'arg' " Alex Dowad
2015-03-25 11:20 ` Jesper Nilsson
2015-03-13 18:04 ` [PATCH 10/32] cris/arch-v32: " Alex Dowad
2015-03-25 11:20 ` Jesper Nilsson
2015-03-13 18:18 ` [PATCH 01/32] do_fork(): Rename 'stack_size' argument to reflect actual use Aaron Tomlin
2015-03-13 23:04 ` josh
2015-03-13 23:21 ` David Rientjes
2015-03-14 17:14 ` Alex Dowad
2015-03-14 16:19 ` Alex Dowad
2015-03-14 17:30 ` Geert Uytterhoeven
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=1426269888-25600-1-git-send-email-alexinbeijing@gmail.com \
--to=alexinbeijing@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=atomlin@redhat.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kernel@vget.kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=vdavydov@parallels.com \
/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
all inboxes | Powered by JetHome®