Faulting out populate(), nopfn(), and nopage()
Faulting out populate(), nopfn(), and nopage()
Posted Aug 11, 2009 13:59 UTC (Tue) by lanjue (guest, #60163)Parent article: Faulting out populate(), nopfn(), and nopage()
我使用2.6.29内核源代码。关于(*fault)()定义不太一样 。
int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
struct vm_fault {
unsigned int flags; /* FAULT_FLAG_xxx flags */
pgoff_t pgoff; /* Logical page offset based on vma */
void __user *virtual_address; /* Faulting virtual address */
struct page *page; /* ->fault handlers should return a
* page here, unless VM_FAULT_NOPAGE
* is set (which is also implied by
* VM_FAULT_ERROR).
*/
};
