linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the pidfd tree
@ 2020-05-12 10:18 Stephen Rothwell
  2020-05-12 10:20 ` Christian Brauner
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2020-05-12 10:18 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Hi all,

After merging the pidfd tree, today's linux-next build (x86_64
allnoconfig) failed like this:

fs/nsfs.c:232:6: error: redefinition of 'proc_ns_file'
  232 | bool proc_ns_file(const struct file *file)
      |      ^~~~~~~~~~~~
In file included from fs/nsfs.c:6:
include/linux/proc_fs.h:194:20: note: previous definition of 'proc_ns_file' was here
  194 | static inline bool proc_ns_file(const struct file *file)
      |                    ^~~~~~~~~~~~

Caused by commit

  1e76b8ad203a ("nsproxy: attach to namespaces via pidfds")

I have applied the following hack for today:

From 07065344c6fb39c440b0de5f75842066bc97a675 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 12 May 2020 20:08:51 +1000
Subject: [PATCH] nsproxy: protect proc_ns_file() when CONFIG_PROC_FS is not set

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/nsfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nsfs.c b/fs/nsfs.c
index 800c1d0eb0d0..9215ad7597d6 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -229,10 +229,12 @@ int ns_get_name(char *buf, size_t size, struct task_struct *task,
 	return res;
 }
 
+#ifdef CONFIG_PROC_FS
 bool proc_ns_file(const struct file *file)
 {
 	return file->f_op == &ns_file_operations;
 }
+#endif
 
 struct file *proc_ns_fget(int fd)
 {
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* linux-next: build failure after merge of the pidfd tree
@ 2019-03-28  2:04 Stephen Rothwell
  2019-03-28  2:28 ` Christian Brauner
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2019-03-28  2:04 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 2571 bytes --]

Hi Christian,

After merging the pidfd tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

kernel/pid.c: In function '__do_sys_pidfd_open':
kernel/pid.c:652:7: error: 'fd' redeclared as different kind of symbol
  long fd = -EINVAL;
       ^~
In file included from kernel/pid.c:40:
kernel/pid.c:649:46: note: previous definition of 'fd' was here
 SYSCALL_DEFINE4(pidfd_open, pid_t, pid, int, fd, int, pidfd,
                                         ~~~~~^~
include/linux/syscalls.h:117:27: note: in definition of macro '__SC_DECL'
 #define __SC_DECL(t, a) t a
                           ^
include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP3'
 #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
                                   ^~~~~~
include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP4'
 #define __MAP(n,...) __MAP##n(__VA_ARGS__)
                      ^~~~~
include/linux/syscalls.h:253:36: note: in expansion of macro '__MAP'
  static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
                                    ^~~~~
include/linux/syscalls.h:226:2: note: in expansion of macro '__SYSCALL_DEFINEx'
  __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
  ^~~~~~~~~~~~~~~~~
include/linux/syscalls.h:218:36: note: in expansion of macro 'SYSCALL_DEFINEx'
 #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
                                    ^~~~~~~~~~~~~~~
kernel/pid.c:649:1: note: in expansion of macro 'SYSCALL_DEFINE4'
 SYSCALL_DEFINE4(pidfd_open, pid_t, pid, int, fd, int, pidfd,
 ^~~~~~~~~~~~~~~
kernel/pid.c:663:7: error: 'procfd' undeclared (first use in this function); did you mean 'pidfd'?
   if (procfd != -1 || pidfd != -1)
       ^~~~~~
       pidfd
kernel/pid.c:663:7: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit

  9170fba40db0 ("pid: add pidfd_open()")

I have used the version of the pifd tree from next-20190327 for today.

Please do *not* use linux-next as a development tree (I have seen several
different version of this code over the past few days :-().  The rules
for linux-next included code include:
"
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch)."
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-12 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 10:18 linux-next: build failure after merge of the pidfd tree Stephen Rothwell
2020-05-12 10:20 ` Christian Brauner
2020-05-12 10:28   ` Christian Brauner
  -- strict thread matches above, loose matches on Subject: below --
2019-03-28  2:04 Stephen Rothwell
2019-03-28  2:28 ` Christian Brauner
2019-03-28  2:57   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).