Running opcontrol --reset on an em64t P4 yields the following (clearly 
there must be a reason why it's disabled but i'll address that  
seperately);

Unable to handle kernel NULL pointer dereference at virtual address 
00000000
 printing eip:
c0562cf4
*pde = 00000000
Oops: 0000 [#1]
PREEMPT SMP DEBUG_PAGEALLOC
Modules linked in:
CPU:    1
EIP:    0060:[<c0562cf4>]    Not tainted VLI
EFLAGS: 00010246   (2.6.11-rc2)
EIP is at oprofilefs_str_to_user+0x24/0x50
eax: 00000000   ebx: 00000000   ecx: ffffffff   edx: ffffffff
esi: 00001000   edi: 00000000   ebp: ec477f78   esp: ec477f60
ds: 007b   es: 007b   ss: 0068
Process cat (pid: 2810, threadinfo=ec476000 task=f739ead0)
Stack: 00000000 c016806a 0804d858 c072aa00 ec9eff58 00001000 ec477f9c c015e1e7
       ec477fa8 00000000 00000000 0804d858 ec9eff58 fffffff7 0804d858 ec477fbc
       c015e50d ec477fa8 00000000 00000000 00000000 00000003 00001000 ec476000
Call Trace:
 [<c0103fea>] show_stack+0x7a/0x90
 [<c0104176>] show_registers+0x156/0x1d0
 [<c01043a0>] die+0x100/0x190
 [<c01170be>] do_page_fault+0x45e/0x644
 [<c0103c77>] error_code+0x2b/0x30
 [<c015e1e7>] vfs_read+0xc7/0x160
 [<c015e50d>] sys_read+0x3d/0x70
 [<c0103105>] sysenter_past_esp+0x52/0x75
Code: 90 90 90 90 90 90 90 55 89 e5 83 ec 18 89 5d f4 31 db 89 55 f0 ba ff 
ff ff ff 89 75 f8 89 ce 89 d1 89 7d fc 89 c7 89 04 24 89 d8 <f2> ae f7 d1 
49 89 4c 24 04 8b 45 f0 89 f2 8b 4d 08 e8 66 e4 c1

->cpu_type is NULL since p4_init skipped this specific processor.

Signed-off-by: Zwane Mwaikambo <[EMAIL PROTECTED]>

===== drivers/oprofile/oprofile_files.c 1.7 vs edited =====
--- 1.7/drivers/oprofile/oprofile_files.c       2005-01-04 19:48:23 -07:00
+++ edited/drivers/oprofile/oprofile_files.c    2005-01-28 11:36:25 -07:00
@@ -63,7 +63,9 @@ static struct file_operations pointer_si
 
 static ssize_t cpu_type_read(struct file * file, char __user * buf, size_t 
count, loff_t * offset)
 {
-       return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, 
offset);
+       if (oprofile_ops.cpu_type)
+               return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, 
count, offset);
+       return -EIO;
 }
  
  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to