BACKPORT: copy_process(): don't use ksys_close() on cleanups
anon_inode_getfd() should be used *ONLY* in situations when we are guaranteed to be past the last failure point (including copying the descriptor number to userland, at that). And ksys_close() should not be used for cleanups at all. anon_inode_getfile() is there for all nontrivial cases like that. Just use that... Bug: 254441685 Fixes: b3e58382 ("clone: add CLONE_PIDFD") Signed-off-by:Al Viro <viro@zeniv.linux.org.uk> Reviewed-by:
Jann Horn <jannh@google.com> Signed-off-by:
Christian Brauner <christian@brauner.io> (cherry picked from commit 6fd2fe49) Signed-off-by:
Lee Jones <joneslee@google.com> Change-Id: Ib24efa6d9776ad1a6f9b8ca08e3aa8deefacfc20
Loading
Please sign in to comment