On Wed, Oct 08, 2014 at 12:20:37PM +0530, Vineet Gupta wrote: > Hi Kirill, > > Due to broken PAGE_FILE on arc, I was giving this emulation patch a try and it > seems we need a minor fix to this patch. I know this is not slated for merge soon, > but u can add the fix nevertheless and my Tested-by: > > Problem showed up with Ingo Korb's remap-demo.c test case from [1] > > [1] https://lkml.org/lkml/2014/7/14/335 > > > + > > + ret = do_mmap_pgoff(vma->vm_file, start, size, > > + prot, flags, pgoff, &populate); > > + if (populate) > > + mm_populate(ret, populate); > > +out: > > + up_write(&mm->mmap_sem); > > On success needs to return 0, not mapped addr. > > if (!IS_ERR_VALUE(ret)) > ret = 0; This bug (and few more) has been fixed long ago in -mm tree. Thanks for testing, anyway. -- Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>