Date: Fri, 30 Sep 2022 16:34:20 -0400 From: Christos Zoulas <chris...@zoulas.com> Message-ID: <232331ad-d501-4547-b730-03590c0c9...@zoulas.com>
| How about handling exclose there? That would be possible, but why? We still need higher level code to handle the locking, which can also handle cloexec -- the problem we have now is simply that the relevant call is missing, I don't think adding it will be hard, but it needs to be done by someone who understands the locking requirements, and correct exit strategy in this case if an error occurs (failing to successfully lock a newly created clone would seem to be a very bizarre case, but still...) That is, I don't feel competent to suggest the 3 or 4 lines that ought be added in do_open to fix this (for just O_CLOEXEC it would be trivial there, as that cannot fail). Currently fd_affix (I mistakenly made it fp_affix in the last message...) doesn't have a flags parameter, so to do it the way you suggest, we'd need to alter its signature, bump to 9.99.101 (and I haven't yet gotten around to making my kernel be 98.99.100 which I'm kind of planning to do ...) and go alter all the calls everywhere, mostly just filling in an extra arg with a 0. kre