Re: Interrupt and spin_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can you please paste your whole code if its not too big.
Just guessing, as page fault handler is executed whenever page fault
occures which is an exception and not an interrupt, so using irq
enable spinlocks might not help. Well it wud be better if you can
provide the whole code.

regards,
-Gaurav


On 8/22/05, Vincenzo Mallozzi <vinjunior@xxxxxxxx> wrote:
> I've again a problem with the page fault handler I'm hijacking.
> 
> The error returned is:
> 
> Unable to handle kernel NULL pointer dereference at virtual address 00000000.
>               ...............
> <0>kernel panic: Aiee, killing interrupt handler
> In interrupt handler - not syncing
> 
> I do the following operation.
> I've a page fault handler function that calls a function to scan a list (of
> type list_head) created by me.
> There's another function that adds page addresses to the list.
> When I call this function to fill the list, I've the problem with NULL
> pointer.
> I try to implement some spin_lock_irq.
> The functions are like the following:
> 
> new_page_fault_handler(
> {
>      ......
>      scanlist();
>      .......
> }
> 
> scanlist()
> {
>     spin_lock_irqsave(...);
>     list_for_each(..)
>             .....
>     spin_unlock_irqrestore();
> }
> 
> fill_list()
> {
>    spin_lock_irqsave(...);
>    for all searched pages do{
>                make pages as not writable;
>                list_add(...);
>    }
>   spin_unlock_irqrestore();
> }
> 
> I've to do some important statements.
> 1) I'm sure the hijacked page fault function works well. I've tested in other
> situations.
> 2) Also the fill_list function works well.
> 
> So, I think there's a serious problem with the lock strategy I've implemented.
> Can anyone tell me a different strategy? Is this really a locking problem?
> Thanks.
> Vincenzo Mallozzi.
> 
> 
> 
> 
> 
> ___________________________________
> Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
> http://mail.yahoo.it
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux