Commit:     e804a4a4dd596d853f6d6f814fbdcf97b8efcdea
Parent:     bbe06f6bf7e764a9eb0e3cdcec2b12c743f35757
Author:     Satyam Sharma <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 00:39:16 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 15:39:42 2007 -0700

    kthread: silence bogus section mismatch warning
    WARNING: kernel/built-in.o(.text+0x16910): Section mismatch:
    reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head')
    comes because kernel/kthread.c:kthreadd() is not __init but calls
    kthreadd_setup() which is __init. But this is ok, because kthreadd_setup()
    is only ever called at init time, and then kthreadd() proceeds into its
    "for (;;)" loop. We could mark kthreadd __init_refok, but kthreadd_setup()
    with just one callsite and 4 lines in it (it's been that small since
    10ab825bdef8df51) doesn't need to be a separate function at all -- so let's
    just move those four lines at beginning of kthreadd() itself.
    Signed-off-by: Satyam Sharma <[EMAIL PROTECTED]>
    Acked-by: Randy Dunlap <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/kthread.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/kernel/kthread.c b/kernel/kthread.c
index a404f7e..dcfe724 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -214,23 +214,15 @@ int kthread_stop(struct task_struct *k)
-static noinline __init_refok void kthreadd_setup(void)
+int kthreadd(void *unused)
        struct task_struct *tsk = current;
+       /* Setup a clean context for our children to inherit. */
        set_task_comm(tsk, "kthreadd");
        set_user_nice(tsk, -5);
        set_cpus_allowed(tsk, CPU_MASK_ALL);
-int kthreadd(void *unused)
-       /* Setup a clean context for our children to inherit. */
-       kthreadd_setup();
        current->flags |= PF_NOFREEZE;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to