[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180311105557.20807-6-linux@dominikbrodowski.net>
Date: Sun, 11 Mar 2018 11:55:27 +0100
From: Dominik Brodowski <linux@...inikbrodowski.net>
To: linux-kernel@...r.kernel.org, luto@...nel.org,
torvalds@...ux-foundation.org, mingo@...nel.org,
viro@...iv.linux.org.uk, akpm@...ux-foundation.org
Subject: [RFC PATCH 05/35] syscalls: do not call sys_readlinkat() within the kernel
CC: Alexander Viro <viro@...iv.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
---
fs/stat.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/stat.c b/fs/stat.c
index 873785dae022..f8e6fb2c3657 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -379,8 +379,8 @@ SYSCALL_DEFINE2(newfstat, unsigned int, fd, struct stat __user *, statbuf)
return error;
}
-SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
- char __user *, buf, int, bufsiz)
+static int do_readlinkat(int dfd, const char __user *pathname,
+ char __user *buf, int bufsiz)
{
struct path path;
int error;
@@ -415,10 +415,16 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
return error;
}
+SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
+ char __user *, buf, int, bufsiz)
+{
+ return do_readlinkat(dfd, pathname, buf, bufsiz);
+}
+
SYSCALL_DEFINE3(readlink, const char __user *, path, char __user *, buf,
int, bufsiz)
{
- return sys_readlinkat(AT_FDCWD, path, buf, bufsiz);
+ return do_readlinkat(AT_FDCWD, path, buf, bufsiz);
}
--
2.16.2
Powered by blists - more mailing lists