Re: [PATCH/RFC] - support inheritance of mlocks across fork/exec

KOSAKI Motohiro
2008-11-26T08:37:07Z

only one nit.

> @@ -599,7 +602,8 @@ asmlinkage long sys_mlockall(int flags)
> unsigned long lock_limit;
> int ret = -EINVAL;
>
> - if (!flags || (flags & ~(MCL_CURRENT | MCL_FUTURE)))
> + if (!flags || (flags & ~(MCL_CURRENT | MCL_FUTURE |
> + MCL_INHERIT | MCL_RECURSIVE)))
> goto out;

from patch description, I think mlockall(MCL_INHERIT) and
mlockall(MCL_RECURSIVE) are incorrect. right?

if so, I think following likes error check is needed.

if (!(flags & (MCL_CURRENT | MCL_FUTURE)))
goto out;

if ((flags & (MCL_INHERIT | MECL_RECURSIVE)) == MCL_RECURSIVE)
goto out;

otherthings, looks good to me.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>