Re: Interrupt and spin_lock

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

 



As you've suggested, I've changed my programs this way:

    for(vm = mm->mmap; vm != NULL; vm = vm->vm_next)
            vma = mtpmc_mk_vm_wrprotected(vm);
            for (addr = vm->vm_start; addr<vm->vm_end; addr+=PAGE_SIZE){
                pte = mtpmc_get_pte_from_address(mm, addr);
                if (pte != NULL)
                    if (pte_write(*pte)){
                        set_pte(pte, pte_wrprotect(*pte));
                        page = mtpmc_mk_page_wrprotected(addr);
                        list_add_tail(&page->list, &vma->pages_list);
                    }
            }
            list_add_tail(&vma->list, &vm_write_protected);
            vma->vm_start = vm->vm_start;
            vma->vm_end = vma->vm_end;

And all works well. But I've once again the problem of "Unable to hanlde 
NULL..." when I try, after the operations above, to delete/add an element in 
the page list associated with a vma. 
When I want to di it, I execute:

  vma = list_entry(vma_list, struct mtpmc_vm_wrprotected, list);
  list_for_each_safe(page_list, temp_page_list, &wr_vma->pages_list){
       page = mtpmc_mk_page_wrprotected(addr);            
       list_add_tail(&page->list,&wr_vma->pages_list); 
        /* or  list_del_init(page_list); */
  }

It seems to be the same error that I've exposed in my previous email.
When I'm wrong?
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/


[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