linux-next: manual merge of the pidfd tree with Linus' tree
From: Stephen Rothwell
Date: Thu Jul 04 2019 - 04:44:17 EST
Hi all,
Today's linux-next merge of the pidfd tree got a conflict in:
kernel/fork.c
between commits:
6fd2fe494b17 ("copy_process(): don't use ksys_close() on cleanups")
28dd29c06d0d ("fork: return proper negative error code")
from Linus' tree and commit:
7f192e3cd316 ("fork: add clone3")
from the pidfd tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc kernel/fork.c
index 847dd147b068,4114a044822c..000000000000
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@@ -1755,7 -1794,7 +1776,8 @@@ static __latent_entropy struct task_str
int pidfd = -1, retval;
struct task_struct *p;
struct multiprocess_signals delayed;
+ struct file *pidfile = NULL;
+ u64 clone_flags = args->flags;
/*
* Don't allow sharing the root directory with processes in a different
@@@ -2030,17 -2070,7 +2050,17 @@@
goto bad_fork_free_pid;
pidfd = retval;
+
+ pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
+ O_RDWR | O_CLOEXEC);
+ if (IS_ERR(pidfile)) {
+ put_unused_fd(pidfd);
+ retval = PTR_ERR(pidfile);
+ goto bad_fork_free_pid;
+ }
+ get_pid(pid); /* held by pidfile now */
+
- retval = put_user(pidfd, parent_tidptr);
+ retval = put_user(pidfd, args->pidfd);
if (retval)
goto bad_fork_put_pidfd;
}
Attachment:
pgpoiuP9DPnOz.pgp
Description: OpenPGP digital signature