Hi,
I get the following kernel panic,
kernel BUG at arch/i386/mm/highmem.c:63!
EIP: 0060:[<c011af5a>] Tainted: PF VLI
EFLAGS: 00010006 (2.6.11-1.1369_FC4smp)
EIP is at kunmap_atomic+0x35/0x5f
The following is the code, I am using in my driver:
kmap_atomic code:
int hr_km_type = (in_interrupt())? KM_IRQ0: KM_USER0;
pDataBuffer = kmap_atomic(cur_seg->page,
hr_km_type) + cur_seg->offset;
if(pDataBuffer == NULL) {
return (ENOMEM);
}
kunmap_atomic code:
int hr_km_type = (in_interrupt())? KM_IRQ0: KM_USER0;
kunmap_atomic(pDataBuffer -
sg->offset, hr_km_type);
I am not using any locks like irq_disable/restore
before and after calling kmap_atomic/kunmap_atomic.
The system has 1GB memory.
with regards,
Anil
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
On Sun, 2006-03-26 at 09:45 -0800, Anil kumar wrote:
>
> Hi,
>
> I get the following kernel panic,
>
> kernel BUG at arch/i386/mm/highmem.c:63!
> EIP: 0060:[<c011af5a>] Tainted: PF VLI
> EFLAGS: 00010006 (2.6.11-1.1369_FC4smp)
> EIP is at kunmap_atomic+0x35/0x5f
>
> The following is the code, I am using in my driver:
>
> kmap_atomic code:
>
> int hr_km_type = (in_interrupt())? KM_IRQ0: KM_USER0;
> pDataBuffer = kmap_atomic(cur_seg->page,
> hr_km_type) + cur_seg->offset;
> if(pDataBuffer == NULL) {
> return (ENOMEM);
> }
>
this is buggy; your irq handler may run with interrupts on for example
I fear the worst for your code ;) I would suggest getting more people to
review it (for example on kernel-newbies list or the kernel-mentors
list) before using it in production ;)