On Thu, Dec 12, 2019 at 11:21:18PM +0800, Li Xinhai wrote: > When vm_ops->page_mkwrite is defined, and called from wp_page_shared and > do_shared_fault, the set_page_dirty must already called by page_mkwrite. Must? Do all ->page_mkwrite implementation do this? > @@ -3645,7 +3646,7 @@ static vm_fault_t do_shared_fault(struct vm_fault *vmf) > * Check if the backing address space wants to know that the page is > * about to become writable > */ > - if (vma->vm_ops->page_mkwrite) { > + if (vma->vm_ops && vma->vm_ops->page_mkwrite) { vma->vm_ops is always non-NULL here. -- Kirill A. Shutemov