mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kernel BUG at arch/i386/mm/highmem.c:63! kunmap_atomic
@ 2006-03-26 17:45 Anil kumar
  2006-03-26 19:02 ` Arjan van de Ven
  0 siblings, 1 reply; 2+ messages in thread
From: Anil kumar @ 2006-03-26 17:45 UTC (permalink / raw)
  To: linux-kernel



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 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kernel BUG at arch/i386/mm/highmem.c:63! kunmap_atomic
  2006-03-26 17:45 kernel BUG at arch/i386/mm/highmem.c:63! kunmap_atomic Anil kumar
@ 2006-03-26 19:02 ` Arjan van de Ven
  0 siblings, 0 replies; 2+ messages in thread
From: Arjan van de Ven @ 2006-03-26 19:02 UTC (permalink / raw)
  To: Anil kumar; +Cc: linux-kernel

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 ;)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-26 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-26 17:45 kernel BUG at arch/i386/mm/highmem.c:63! kunmap_atomic Anil kumar
2006-03-26 19:02 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®