[pso] [tema1][lin] alocare ?
Mihai Bucicoiu
mihai.bucicoiu at gmail.com
Fri Mar 27 01:01:21 EET 2009
Primesc urmatoarea eroare dupa cateva executari succesive :
(mesajele sunt colectate dupa o consola cu ssh pe faust) :
kernel:Oops: 0002 [#1] PREEMPT DEBUG_PAGEALLOC
kernel:last sysfs file: /sys/devices/virtual/net/lo/operstate
kernel:Process insmod (pid: 2300, ti=c4051000 task=c7bb5780
task.ti=c4051000)
kernel:Stack:
kernel: c89cb680 c4051e58 c7b03448 00000001 c89cb680 c4051e60 c0170981
c4051f8c
kernel: c014b698 00000000 00000000 c4051f78 c4051f20 00000888 c7bb5b00
c89cb680
kernel:Call Trace:
kernel: [<c010102d>] ? _stext+0x2d/0x170
kernel: [<c01708e4>] ? __vunmap+0xa4/0xf0
kernel: [<c0170981>] ? vfree+0x21/0x30
kernel: [<c014b698>] ? load_module+0x19b8/0x1a40
kernel: [<c035e955>] ? __mutex_unlock_slowpath+0xd5/0x140
kernel: [<c0140da6>] ? trace_hardirqs_on_caller+0x106/0x150
kernel: [<c014b7aa>] ? sys_init_module+0x8a/0x1b0
kernel: [<c0140da6>] ? trace_hardirqs_on_caller+0x106/0x150
kernel: [<c02409f8>] ? trace_hardirqs_on_thunk+0xc/0x10
kernel: [<c0103407>] ? sysenter_do_call+0x12/0x43
kernel:Code: c0 a3 80 b8 9c c8 74 3d b8 34 b6 9c c8 e8 d5 4d 99 f7 8b 15 38
b5 44 c0 85 d2 7e 1d 31 c9 90 8b 14 8d 04 b0 44 c0 a1 80 b8 9c c8 <89> 14 88
83 c1 01 39 0d 38 b5 44 c0 7f e6 b8 34 b6 9c c8 e8 14
* kernel:EIP: [<c89cb164>] my_init+0x64/0x90 [sci] SS:ESP 0068:c4051e24
test: insmod sci.ko...............................................failed*
dupa un *objdump -dS --adjust-vma=0xc89cb000 sci.ko *am obtinut :
*c89cb164: 89 14 88 mov %edx,(%eax,%ecx,4)
return -ENOMEM;
*
Si acum in functia de initializare pentru modul eu am ceva de genul :
*
if (!( my_sys_call_table = (my_sys_call_ptr_t *) kmalloc
(my_nr_syscalls + 1,GFP_KERNEL)))
{
return -ENOMEM;
}*
cu urmatoarele definiri :
* typedef void (* my_sys_call_ptr_t) (struct syscall_params sp);
my_sys_call_ptr_t *my_sys_call_table;*
Acuma din cate imi dau eu seama daca rulez de mai multe ori consecutiv ...
umple stiva. Am zis okey ... si am pus la partea de iesire din modul :
* kfree(my_sys_call_table);*
De data asta desi nu cu acceasi frecventza de rulare (3 ori consecutiv ptr
primul bug), 5 ori de data aceasta ... imi genereaza un kernel bug (la care
atasez poza).
Vreo solutie ?
Mihai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/pso/attachments/20090327/ebf65cb2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eroare.jpg
Type: image/jpeg
Size: 78163 bytes
Desc: not available
URL: <http://cursuri.cs.pub.ro/pipermail/pso/attachments/20090327/ebf65cb2/attachment-0001.jpg>
More information about the pso
mailing list