[Click] Memory allocation in Click elements

Grzegorz Adamski grega at interia.pl
Thu Apr 29 18:28:13 EDT 2004


Hi,
I'm trying to allocate large amount of memory in one of my elements (30
- 40 MBs). And while everything works fine in user mode, I can't make
the kernel driver to work. First I tried declaring a static table, later
I tried allocating memory for the table dynamically, but every time I
run the router I get the following error messages from the kernel:

kernel: click: starting router thread pid 3258 (d9beb940)
kernel: Unable to handle kernel NULL pointer dereference at virtual
address 00000000
kernel:  printing eip:
kernel: dca45db8
kernel: *pde = 18f31067
kernel: *pte = 00000000
kernel: Oops: 0002
kernel: CPU:    0
kernel: EIP:    0010:[<dca45db8>]    Not tainted
kernel: EFLAGS: 00013202
kernel: eax: 00000000   ebx: 00000000   ecx: 007a1204   edx: 00000004
kernel: esi: d51c3cc0   edi: 00000001   ebp: c8a3bf3c   esp: c8a3bed4
kernel: ds: 0018   es: 0018   ss: 0018
kernel: Process kclick (pid: 3258, stackpage=c8a3b000)
kernel: Stack: 00200096 c0374470 0000000e 00000004 c14de800 20000001
c8a3bf38 0000000e
kernel:        c0108845 d8b58000 c8a3a000 da556540 c0111d2a c8a3bf3c
d3fa2ec0 d5e46000
kernel:        00000000 dc8e8000 00002000 d3fa2ec0 c8a3a000 00000000
c034dd80 d51c3cc0
kernel: Call Trace:    [<c0108845>] [<c0111d2a>] [<dc9f05df>]
[<dca3dfed>] [<dca046a0>]
kernel:   [<dca65e0e>] [<c010577e>] [<dca65d90>]
kernel:
kernel: Code: c7 00 40 42 0f 00 89 d3 bf 3f 42 0f 00 8d 76 00 83 ec 0c
53

Any suggestions as to the cause of the problem? Is there any "special"
way to allocate memory for the kernel driver module (for now I'm using
"new").
Thanks
Greg Adamski




More information about the click mailing list