[CRIU] [PATCH 1/4] arm: Fix wrong system call number

Vijaya Kumar K Vijaya.Kumar at caviumnetworks.com
Mon Dec 28 00:09:39 PST 2015


System call number 78 corresponds to readlinkat.
Where as 78 is mapped to readlink() in syscall.def for
arm.

With this patch, use sys_readlinkat instead of sys_readlink
and update syscall.def to point syscall number 78 to readlinkat()
instead of readlink()

Signed-off-by: Vijaya Kumar K <vijayak at caviumnetworks.com>
---
 arch/arm/syscall.def |    2 +-
 pie/parasite.c       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/syscall.def b/arch/arm/syscall.def
index b8b3b1a..ec249d0 100644
--- a/arch/arm/syscall.def
+++ b/arch/arm/syscall.def
@@ -52,7 +52,7 @@ flock				32	143	(int fd, unsigned long cmd)
 mkdir				!	39	(const char *name, int mode)
 rmdir				!	40	(const char *name)
 unlink				!	10	(char *pathname)
-readlink			78	85	(const char *path, char *buf, int bufsize)
+readlinkat			78	85	(int fd, const char *path, char *buf, int bufsize)
 umask				166	60	(int mask)
 getgroups			158	205	(int gsize, unsigned int *groups)
 setresuid			147	164	(int uid, int euid, int suid)
diff --git a/pie/parasite.c b/pie/parasite.c
index a39c035..94c1c0c 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -283,7 +283,7 @@ static int parasite_get_proc_fd()
 	int ret, fd = -1;
 	char buf[2];
 
-	ret = sys_readlink("/proc/self", buf, sizeof(buf));
+	ret = sys_readlinkat(AT_FDCWD, "/proc/self", buf, sizeof(buf));
 	if (ret < 0 && ret != -ENOENT) {
 		pr_err("Can't readlink /proc/self (%d)\n", ret);
 		return ret;
-- 
1.7.9.5



More information about the CRIU mailing list