[CRIU] [PATCH v2 00/24] exec: Move unshare_files and guarantee files_struct.count is correct

Eric W. Biederman ebiederm at xmission.com
Mon Nov 23 19:00:12 MSK 2020


Linus Torvalds <torvalds at linux-foundation.org> writes:

> On Fri, Nov 20, 2020 at 3:11 PM Eric W. Biederman <ebiederm at xmission.com> wrote:
>>
>> This set of changes cleanups of the code in exec so hopefully this code
>> will not regress again.  Then it adds helpers and fixes the users of
>> files_struct so the reference count is only incremented if COPY_FILES is
>> passed to clone (or if io_uring takes a reference).  Then it removes
>> helpers (get_files_struct, __install_fd, __alloc_fd, __close_fd) that
>> are no longer needed and if used would encourage code that increments
>> the count of files_struct somewhere besides in clone when COPY_FILES is
>> passed.
>
> I'm not seeing anything that triggered me going "that looks dodgy". It
> all looks like nice cleanups.
>
> But that's just from reading the patches (and in some cases going and
> looking at the context), so I didn't actually _test_ any of it. It all
> looks sane to me, though, and the fact that it removes a fair number
> of lines of code is always a good sign.
>
> It would be good for people to review and test (Al? Oleg? others?),
> but my gut feel is "this is good".

Thanks.  I will hold off applying this to my tree a couple of days to
see if something turns up.  In addition to my personal testing, I have
had a version of these patches sitting on a test branch where the test
bots can pick it up for the last 12 weeks or so, and nothing has turned
up.

Unless something shows up I will put this in my branch of exec changes
and get this into linux-next sometime later this week.

Eric


More information about the CRIU mailing list