[CRIU] [PATCH v2 01/24] exec: Move unshare_files to fix posix file locking during exec

Eric W. Biederman ebiederm at xmission.com
Wed Dec 9 02:16:34 MSK 2020


Al Viro <viro at zeniv.linux.org.uk> writes:

> On Mon, Dec 07, 2020 at 05:07:55PM -0600, Eric W. Biederman wrote:
>
>> My mistake.  I missed that the actual code was highly optimized and only
>> safe in the presence of an unshared files struct.
>
> That's a polite way to spell "overoptimized for no good reason" ;-)
>
>> What I saw and what I thought the comment was talking about was that the
>> result of the test isn't guaranteed to be stable without having an
>> exclusive access to the files.  I figured and if something changes later
>> and it becomes safe to pass the file name to a script later we don't
>> really care.
>> 
>> In any event thank you for the review.  I will queue up a follow on
>> patch that makes this use get_close_on_exec.
>
> I would rather put that switch to get_close_on_exec() first in the queue
> (or fold it into this patch)...

All else being equal I would like that placement too.  With the rest of
the patches in linux-next I don't want to mess unless it is bad enough
to breaks someone's bisection of the kernel.

Eric



More information about the CRIU mailing list