From: Arnd Bergmann <arnd@arndb.de>
To: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
Russell King <rmk+kernel@armlinux.org.uk>,
Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: oabi-compat: fix epoll_ctl build failure
Date: Tue, 28 Apr 2020 23:37:30 +0200 [thread overview]
Message-ID: <20200428213747.3663311-1-arnd@arndb.de> (raw)
Two functions are not declared or defined when CONFIG_EPOLL is
disabled:
arch/arm/kernel/sys_oabi-compat.c: In function 'sys_oabi_epoll_ctl':
arch/arm/kernel/sys_oabi-compat.c:258:6: error: implicit declaration of function 'ep_op_has_event' [-Werror=implicit-function-declaration]
258 | if (ep_op_has_event(op) &&
| ^~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:265:9: error: implicit declaration of function 'do_epoll_ctl'; did you mean 'sys_epoll_ctl'? [-Werror=implicit-function-declaration]
265 | return do_epoll_ctl(epfd, op, fd, &kernel, false);
| ^~~~~~~~~~~~
| sys_epoll_ctl
Blank out the entire function contents in this case.
Fixes: c281634c8652 ("ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Alternatively, we could use stub functions in the header file, or
hide the entire function and use sys_ni_syscall() to provide a
stub entry point.
---
arch/arm/kernel/sys_oabi-compat.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index 85a1e95341d8..cdc99bab1a1d 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -252,6 +252,7 @@ struct oabi_epoll_event {
asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
struct oabi_epoll_event __user *event)
{
+#ifdef CONFIG_EPOLL
struct oabi_epoll_event user;
struct epoll_event kernel;
@@ -263,6 +264,9 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
kernel.data = user.data;
return do_epoll_ctl(epfd, op, fd, &kernel, false);
+#else
+ return -ENOSYS;
+#endif
}
asmlinkage long sys_oabi_epoll_wait(int epfd,
--
2.26.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>,
Russell King <rmk+kernel@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: oabi-compat: fix epoll_ctl build failure
Date: Tue, 28 Apr 2020 23:37:30 +0200 [thread overview]
Message-ID: <20200428213747.3663311-1-arnd@arndb.de> (raw)
Two functions are not declared or defined when CONFIG_EPOLL is
disabled:
arch/arm/kernel/sys_oabi-compat.c: In function 'sys_oabi_epoll_ctl':
arch/arm/kernel/sys_oabi-compat.c:258:6: error: implicit declaration of function 'ep_op_has_event' [-Werror=implicit-function-declaration]
258 | if (ep_op_has_event(op) &&
| ^~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:265:9: error: implicit declaration of function 'do_epoll_ctl'; did you mean 'sys_epoll_ctl'? [-Werror=implicit-function-declaration]
265 | return do_epoll_ctl(epfd, op, fd, &kernel, false);
| ^~~~~~~~~~~~
| sys_epoll_ctl
Blank out the entire function contents in this case.
Fixes: c281634c8652 ("ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Alternatively, we could use stub functions in the header file, or
hide the entire function and use sys_ni_syscall() to provide a
stub entry point.
---
arch/arm/kernel/sys_oabi-compat.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index 85a1e95341d8..cdc99bab1a1d 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -252,6 +252,7 @@ struct oabi_epoll_event {
asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
struct oabi_epoll_event __user *event)
{
+#ifdef CONFIG_EPOLL
struct oabi_epoll_event user;
struct epoll_event kernel;
@@ -263,6 +264,9 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
kernel.data = user.data;
return do_epoll_ctl(epfd, op, fd, &kernel, false);
+#else
+ return -ENOSYS;
+#endif
}
asmlinkage long sys_oabi_epoll_wait(int epfd,
--
2.26.0
next reply other threads:[~2020-04-28 21:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 21:37 Arnd Bergmann [this message]
2020-04-28 21:37 ` [PATCH] ARM: oabi-compat: fix epoll_ctl build failure Arnd Bergmann
2020-04-29 6:28 ` Christoph Hellwig
2020-04-29 6:28 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428213747.3663311-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=hch@lst.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.