Showing error 1782

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: arch/x86/kernel/smpboot.c
Line in file: 865
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 835         * reschedule the child.
 836         */
 837        if (c_idle.idle) {
 838                c_idle.idle->thread.sp = (unsigned long) (((struct pt_regs *)
 839                        (THREAD_SIZE +  task_stack_page(c_idle.idle))) - 1);
 840                init_idle(c_idle.idle, cpu);
 841                goto do_rest;
 842        }
 843
 844        if (!keventd_up() || current_is_keventd())
 845                c_idle.work.func(&c_idle.work);
 846        else {
 847                schedule_work(&c_idle.work);
 848                wait_for_completion(&c_idle.done);
 849        }
 850
 851        if (IS_ERR(c_idle.idle)) {
 852                printk("failed fork for CPU %d\n", cpu);
 853                return PTR_ERR(c_idle.idle);
 854        }
 855
 856        set_idle_for_cpu(cpu, c_idle.idle);
 857do_rest:
 858#ifdef CONFIG_X86_32
 859        per_cpu(current_task, cpu) = c_idle.idle;
 860        init_gdt(cpu);
 861        /* Stack for startup_32 can be just as for start_secondary onwards */
 862        irq_ctx_init(cpu);
 863#else
 864        cpu_pda(cpu)->pcurrent = c_idle.idle;
 865        clear_tsk_thread_flag(c_idle.idle, TIF_FORK);
 866#endif
 867        early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu);
 868        initial_code = (unsigned long)start_secondary;
 869        stack_start.sp = (void *) c_idle.idle->thread.sp;
 870
 871        /* start_ip had better be page-aligned! */
 872        start_ip = setup_trampoline();
 873
 874        /* So we see what's up   */
 875        printk(KERN_INFO "Booting processor %d APIC 0x%x ip 0x%lx\n",
Show full sources