kmalloc and other memory allocation failures.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I'm building a new kernel for an embedded CPU (pc/104 AMD Geode LX) and am having some issues with previously working modules I wrote.

The new kernel is 2.6.22.1. The original (working) kernel is/was 2.6.13

My modules seem to fail upon load, in particular they fail at kmalloc (which I removed the call for in my module during this test) and now fail during register_chrdev(). This all worked fine with 2.6.13.

It seems that somehow I messed up in kernel configuration with respect to kernel memory.

The below dump is from the program line:
tmp_major = register_chrdev (sysmon_base, "smon", &sys_fops);

sysmon_base is set = 127
sys_fops is a standard issue file_operations struct

Any tips/hints?

thanks!
-Bruce


kernel OOPS message:

PCMC System Monitor Device Driver Loading...
SYSMON: using RTC generated interrupts
SYSMON: assigned Kernel base addr d001a0c0 IRQ 8
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000001
printing eip:
c016d331
*pde = 00000000
Oops: 0000 [#1]
PREEMPT
Modules linked in: sys
CPU:    0
EIP:    0060:[<c016d331>]    Not tainted VLI
EFLAGS: 00010216   (2.6.22.1 #9)
EIP is at __register_chrdev_region+0x61/0x180
eax: 00000000   ebx: 00000034   ecx: 0000003f   edx: 00000100
esi: 00000001   edi: cf19a6b0   ebp: cf19a6a0   esp: ce684f34
ds: 007b   es: 007b   fs: 0000  gs: 0000  ss: 0068
Process insmod (pid: 414, ti=ce684000 task=cf793100 task.ti=ce684000)
Stack: 00000000 00000100 00000000 d0018e80 00000001 fffffff4 00000001 c016d5f7 00000001 0000000e 00000000 00000000 d0018e80 fffffff4 00000034 d0018e80 b7fdfe58 b7ffd88c ce684f9c d001d093 00000079 d00177f9 d0018d60 00000001
Call Trace:
[<c016d5f7>] register_chrdev+0x27/0x110
[<d001d093>] sysmon_init+0x93/0x254 [sys]
[<c0129e07>] blocking_notifier_call_chain+0x17/0x20
[<c013f302>] sys_init_module+0xd2/0x140
[<c010416a>] syscall_call+0x7/0xb
=======================
Code: 4c c0 e8 43 f4 24 00 85 db 0f 84 a3 00 00 00 89 5d 04 8d 7d 10 b9 40 00 00 00 8b 44 24 08 89 45 08 8b 54 24 04 89 55 0c 49 78 08 <ac> aa 84 c0 75 f7 f3 aa b8 81 80 80 80 f7 eb 89 d8 c1 f8 1f 8d EIP: [<c016d331>] __register_chrdev_region+0x61/0x180 SS:ESP 0068:ce684f34

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux