The patch titled ehca: avoid crash on kthread_create() failure has been added to the -mm tree. Its filename is ehca-avoid-crash-on-kthread_create-failure.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ehca: avoid crash on kthread_create() failure From: Akinobu Mita <akinobu.mita@xxxxxxxxx> This patch disallows invalid task_struct pointer returned by kthread_create() to be written to percpu data to avoid crash. Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Hoang-Nam Nguyen <hnguyen@xxxxxxxxxx> Cc: Christoph Raisch <raisch@xxxxxxxxxx> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> Cc: Muli Ben-Yehuda <muli@xxxxxxxxxx> Cc: Roland Dreier <rolandd@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/infiniband/hw/ehca/ehca_irq.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff -puN drivers/infiniband/hw/ehca/ehca_irq.c~ehca-avoid-crash-on-kthread_create-failure drivers/infiniband/hw/ehca/ehca_irq.c --- a/drivers/infiniband/hw/ehca/ehca_irq.c~ehca-avoid-crash-on-kthread_create-failure +++ a/drivers/infiniband/hw/ehca/ehca_irq.c @@ -606,15 +606,20 @@ static int comp_task(void *__cct) static struct task_struct *create_comp_task(struct ehca_comp_pool *pool, int cpu) { + struct task_struct *task; struct ehca_cpu_comp_task *cct; cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); spin_lock_init(&cct->task_lock); INIT_LIST_HEAD(&cct->cq_list); init_waitqueue_head(&cct->wait_queue); - cct->task = kthread_create(comp_task, cct, "ehca_comp/%d", cpu); + task = kthread_create(comp_task, cct, "ehca_comp/%d", cpu); + if (!IS_ERR(task)) + cct->task = task; + else + cct->task = NULL; - return cct->task; + return task; } static void destroy_comp_task(struct ehca_comp_pool *pool, @@ -684,8 +689,10 @@ static int comp_pool_callback(struct not case CPU_UP_CANCELED: ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu); cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); - kthread_bind(cct->task, any_online_cpu(cpu_online_map)); - destroy_comp_task(pool, cpu); + if (cct->task) { + kthread_bind(cct->task, any_online_cpu(cpu_online_map)); + destroy_comp_task(pool, cpu); + } break; case CPU_ONLINE: ehca_gen_dbg("CPU: %x (CPU_ONLINE)", cpu); _ Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are ehca-fix-kthread_create-error-check.patch ehca-fix-do_mmap-error-check.patch ehca-avoid-crash-on-kthread_create-failure.patch powerpc-use-is_init.patch git-dvb.patch git-input.patch git-mtd.patch net-use-bitrev8.patch auth_gss-unregister-gss_domain-when-unloading-module.patch iscsi-fix-crypto_alloc_hash-error-check.patch git-watchdog.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