From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266155AbUHAUBQ (ORCPT ); Sun, 1 Aug 2004 16:01:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266158AbUHAUBQ (ORCPT ); Sun, 1 Aug 2004 16:01:16 -0400 Received: from mail.broadpark.no ([217.13.4.2]:64241 "EHLO mail.broadpark.no") by vger.kernel.org with ESMTP id S266155AbUHAUBK convert rfc822-to-8bit (ORCPT ); Sun, 1 Aug 2004 16:01:10 -0400 To: linux-kernel@vger.kernel.org Subject: Oops in register_chrdev, what did I do? From: =?iso-8859-1?q?M=E5ns_Rullg=E5rd?= Date: Sun, 01 Aug 2004 22:01:10 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org While experimenting a bit with a small kernel module, I got this oops. Digging further, I found that /proc/devices had an entry saying 248 which would indicate that I passed a NULL name to register_chrdev(), only I didn't. I used a string constant, so I can't see what changed it to NULL along the way. What am I missing here? Unable to handle kernel NULL pointer dereference at virtual address 00000000 c014cad4 *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[] Tainted: P Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00210282 (2.6.6) eax: e0f93414 ebx: e0f93410 ecx: 00000000 edx: 00000000 esi: 00000000 edi: e0f93414 ebp: de43357c esp: d7487f64 ds: 007b es: 007b ss: 0068 Stack: 00000000 e0f93414 fffffff4 000000f8 c0332c74 d7486000 e8969b80 d7487fa0 e896b023 000000f8 e89691c9 e8969b20 fffffffc c0332c74 d7486000 c0332c5c c012ac2a 00000001 00000000 40152000 00000003 00000000 d7486000 c0103d29 Call Trace: [] init_foo+0x23/0x40 [foo] [] sys_init_module+0x105/0x211 [] sysenter_past_esp+0x52/0x71 Code: ac aa 84 c0 75 fa ba 2f 00 00 00 8b 74 24 04 89 d0 88 c4 ac >>EIP; c014cad4 <===== >>eax; e0f93414 >>ebx; e0f93410 >>edi; e0f93414 >>ebp; de43357c >>esp; d7487f64 Trace; e896b023 Trace; c012ac2a Trace; c0103d29 Code; c014cad4 00000000 <_EIP>: Code; c014cad4 <===== 0: ac lods %ds:(%esi),%al <===== Code; c014cad5 1: aa stos %al,%es:(%edi) Code; c014cad6 2: 84 c0 test %al,%al Code; c014cad8 4: 75 fa jne 0 <_EIP> Code; c014cada 6: ba 2f 00 00 00 mov $0x2f,%edx Code; c014cadf b: 8b 74 24 04 mov 0x4(%esp,1),%esi Code; c014cae3 f: 89 d0 mov %edx,%eax Code; c014cae5 11: 88 c4 mov %al,%ah Code; c014cae7 13: ac lods %ds:(%esi),%al -- Måns Rullgård mru@kth.se