Re: Return value of __mm_populate

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

 



(4/13/13 5:14 AM), Marco Stornelli wrote:
> Hi,
> 
> I was seeing the code of __mm_populate (in -next) and I've got a doubt 
> about the return value. The function __mlock_posix_error_return should 
> return a proper error for mlock, converting the return value from 
> __get_user_pages. It checks for EFAULT and ENOMEM. Actually 
> __get_user_pages could return, in addition, ERESTARTSYS and EHWPOISON. 

__get_user_pages doesn't return EHWPOISON if FOLL_HWPOISON is not specified.
I'm not expert ERESTARTSYS. I understand correctly, ERESTARTSYS is only returned
when signal received, and signal handling routine (e.g. do_signal) modify EIP and
hidden ERESTARTSYS from userland generically.


> So it seems to me that we could return to user space not expected value. 
> I can't see them on the man page. In addition we shouldn't ever return 
> ERESTARTSYS to the user space but EINTR. According to the man pages 
> maybe we should return EAGAIN in these cases. Am I missing something?


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux