Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9d8945c7 authored by Al Viro's avatar Al Viro Committed by Lee Jones
Browse files

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: b3e583825266 ("clone: add CLONE_PIDFD")
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Reviewed-by: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
(cherry picked from commit 6fd2fe494b17bf2dec37b610d23a43a72b16923a)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ib24efa6d9776ad1a6f9b8ca08e3aa8deefacfc20
parent 435c9b11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment