[pso] [tema3 linux]GFP_NOIO, GFP_KERNEL si bio_add_page
Florin Antonescu
florinantonescu at yahoo.com
Fri May 2 11:22:23 EEST 2008
1. Care este diferenta intre GFP_NOIO si GFP_KERNEL?
2. De ce urmatoarea secventa functioneaza uneori (am folosit-o pentru a citi CRC-urile de pe cele doua discuri) si atunci cand incec sa aloc doua bio-uri pentru scriere imi da eroarea de ai jos?
Secventa este:
bio1 = bio_alloc(GFP_NOIO, nr_pages);
for (i=0; i<nr_pages; i++){
bio_page = alloc_page(GFP_NOIO);
bio_add_page(bio1, bio_page, PAGE_SIZE, 0);
}
iar eroarea:
BUG: unable to handle kernel NULL pointer dereference at virtual address 000000a
4
printing eip: c018e9f3 *pde = 00000000
Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
Modules linked in: ssr netconsole pcnet32 ide_cd crc32 cdrom
Pid: 2571, comm: bio_thread Not tainted (2.6.24.2 #14)
EIP: 0060:[<c018e9f3>] EFLAGS: 00010286 CPU: 0
EIP is at bio_add_page+0x13/0x50
EAX: 00000000 EBX: c6751918 ECX: 00001000 EDX: c10e1440
ESI: c10e1440 EDI: 00000001 EBP: c678ef2c ESP: c678ef18
DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process bio_thread (pid: 2571, ti=c678e000 task=c67ef580 task.ti=c678e000)
Stack: c6751918 c78c2e18 c6751918 c6751918 00000001 c678efcc c884c7f8 00000000
00000007 00000000 00000001 c67ae280 c6751238 00000238 00000001 c67ef580
c660cd38 c79a5918 c67e2000 c0137003 0000000c c6751868 00000000 00000001
Call Trace:
[<c0103d3a>] show_trace_log_lvl+0x1a/0x30
[<c0103df9>] show_stack_log_lvl+0xa9/0xd0
[<c0103eea>] show_registers+0xca/0x250
[<c0104190>] die+0x120/0x240
[<c032cdfc>] do_page_fault+0x39c/0x7c0
[<c032b3e2>] error_code+0x6a/0x70
[<c884c7f8>] do_bio+0x468/0x628 [ssr]
[<c012a582>] kthread+0x42/0x70
[<c0103917>] kernel_thread_helper+0x7/0x10
=======================
Code: 00 c7 47 08 00 00 00 00 e9 ad fe ff ff 8d 74 26 00 8d bc 27 00 00 00 00 55
89 e5 83 ec 14 89 5d f8 89 c3 89 75 fc 89 d6 8b 40 08 <8b> 80 a4 00 00 00 8b 40
38 0f b7 90 8c 01 00 00 89 0c 24 89 f1
EIP: [<c018e9f3>] bio_add_page+0x13/0x50 SS:ESP 0068:c678ef18
Florin
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080502/f30a62d9/attachment.htm
More information about the pso
mailing list