Subject: + kernel-padatac-register-hotcpu-notifier-after-initialization.patch added to -mm tree To: richard@xxxxxx,herbert@xxxxxxxxxxxxxxxxxxx,steffen.klassert@xxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 26 Aug 2013 14:55:05 -0700 The patch titled Subject: kernel/padata.c: register hotcpu notifier after initialization has been added to the -mm tree. Its filename is kernel-padatac-register-hotcpu-notifier-after-initialization.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/kernel-padatac-register-hotcpu-notifier-after-initialization.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/kernel-padatac-register-hotcpu-notifier-after-initialization.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Richard Weinberger <richard@xxxxxx> Subject: kernel/padata.c: register hotcpu notifier after initialization padata_cpu_callback() takes pinst->lock, to avoid taking an uninitialized lock, register the notifier after it's initialization. Signed-off-by: Richard Weinberger <richard@xxxxxx> Cc: Steffen Klassert <steffen.klassert@xxxxxxxxxxx> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/padata.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff -puN kernel/padata.c~kernel-padatac-register-hotcpu-notifier-after-initialization kernel/padata.c --- a/kernel/padata.c~kernel-padatac-register-hotcpu-notifier-after-initialization +++ a/kernel/padata.c @@ -1086,18 +1086,18 @@ struct padata_instance *padata_alloc(str pinst->flags = 0; -#ifdef CONFIG_HOTPLUG_CPU - pinst->cpu_notifier.notifier_call = padata_cpu_callback; - pinst->cpu_notifier.priority = 0; - register_hotcpu_notifier(&pinst->cpu_notifier); -#endif - put_online_cpus(); BLOCKING_INIT_NOTIFIER_HEAD(&pinst->cpumask_change_notifier); kobject_init(&pinst->kobj, &padata_attr_type); mutex_init(&pinst->lock); +#ifdef CONFIG_HOTPLUG_CPU + pinst->cpu_notifier.notifier_call = padata_cpu_callback; + pinst->cpu_notifier.priority = 0; + register_hotcpu_notifier(&pinst->cpu_notifier); +#endif + return pinst; err_free_masks: _ Patches currently in -mm which might be from richard@xxxxxx are kernel-padatac-register-hotcpu-notifier-after-initialization.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html