lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectlinux-next: build failure after merge of the pidfd tree
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-05-12 12:18    [W:0.080 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site