Showing error 1780

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


Source:

157        }
158        return bp;
159}
160
161void dump_trace(struct task_struct *task, struct pt_regs *regs,
162                unsigned long *stack, unsigned long bp,
163                const struct stacktrace_ops *ops, void *data)
164{
165        const unsigned cpu = get_cpu();
166        unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr;
167        unsigned used = 0;
168        struct thread_info *tinfo;
169
170        if (!task)
171                task = current;
172
173        if (!stack) {
174                unsigned long dummy;
175                stack = &dummy;
176                if (task && task != current)
177                        stack = (unsigned long *)task->thread.sp;
178        }
179
180#ifdef CONFIG_FRAME_POINTER
181        if (!bp) {
182                if (task == current) {
183                        /* Grab bp right from our regs */
184                        get_bp(bp);
185                } else {
186                        /* bp is the last reg pushed by switch_to */
187                        bp = *(unsigned long *) task->thread.sp;
188                }
189        }
190#endif
191
192        /*
193         * Print function call entries in all stacks, starting at the
194         * current stack address. If the stacks consist of nested
195         * exceptions
196         */
197        tinfo = task_thread_info(task);
Show full sources