Skip to contentSkip to conversation

2.6.15-mm2

DISCUSSION Chuck Ebbert 1 participant 1 message Jan 7, 2006

lore
Share & tools
lore
#0 lore raw

printk-levels-for-i386-oops-code.patch has two minor problems:

Review void show_stack(struct task_struct *task · line 186

Quoted 11 lines
(quoted diff) +2 -1
@@ -178,14 +178,15 @@ void show_stack(struct task_struct *task
        }
 
        stack = esp;
+       printk(KERN_EMERG);
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
                if (i && ((i % 8) == 0))
-                       printk("\n       ");
+                       printk("\n       " KERN_EMERG);

Should be:
+ printk("\n" KERN_EMERG " ");

Review void show_stack(struct task_struct *task · line 191

Quoted 6 lines
(quoted diff) +1 -1
                printk("%08lx ", *stack++);
        }
-       printk("\nCall Trace:\n");
+       printk("\n" KERN_EMERG "Call Trace:\n");
        show_trace(task, esp);
 }

And:

Quoted 8 lines
(quoted diff) +1 -1
@@ -236,17 +237,17 @@ void show_registers(struct pt_regs *regs
        if (in_kernel) {
                u8 __user *eip;
 
-               printk("\nStack: ");
+               printk("\n" KERN_EMERG "Stack: ");
                show_stack(NULL, (unsigned long*)esp);
 

Review void show_registers(struct pt_regs *regs · line 250

Quoted 10 lines
(quoted diff) +2 -2
-               printk("Code: ");
+               printk(KERN_EMERG "Code: ");
 
                eip = (u8 __user *)regs->eip - 43;
                for (i = 0; i < 64; i++, eip++) {
                        unsigned char c;
 
                        if (eip < (u8 __user *)PAGE_OFFSET || __get_user(c, eip)) {
-                               printk(" Bad EIP value.");
+                               printk(KERN_EMERG " Bad EIP value.");

The above one-line change should not be made -- it's in the middle of a line.

Quoted 3 lines
(quoted diff) +0 -0
                                break;
                        }
                        if (eip == (u8 __user *)regs->eip)
Signature · 2 lines
Chuck
Currently reading: _Sleepside: The Collected Fantasies Of Greg Bear_