[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <159221289568.16989.17711770547953767180.tip-bot2@tip-bot2>
Date: Mon, 15 Jun 2020 09:21:35 -0000
From: "tip-bot2 for Jiri Slaby" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jiri Slaby <jslaby@...e.cz>, Thomas Gleixner <tglx@...utronix.de>,
Brian Gerst <brgerst@...il.com>, stable@...r.kernel.org,
x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [tip: x86/urgent] syscalls: Fix offset type of ksys_ftruncate()
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 8e742aa79780b13cd300a42198c1a4cea9c89905
Gitweb: https://git.kernel.org/tip/8e742aa79780b13cd300a42198c1a4cea9c89905
Author: Jiri Slaby <jslaby@...e.cz>
AuthorDate: Wed, 10 Jun 2020 13:48:51 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Mon, 15 Jun 2020 11:16:27 +02:00
syscalls: Fix offset type of ksys_ftruncate()
After the commit below, truncate() on x86 32bit uses ksys_ftruncate(). But
ksys_ftruncate() truncates the offset to unsigned long.
Switch the type of offset to loff_t which is what do_sys_ftruncate()
expects.
Fixes: 121b32a58a3a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments)
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Brian Gerst <brgerst@...il.com>
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20200610114851.28549-1-jslaby@suse.cz
---
include/linux/syscalls.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7c354c2..b951a87 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -1360,7 +1360,7 @@ static inline long ksys_lchown(const char __user *filename, uid_t user,
extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
-static inline long ksys_ftruncate(unsigned int fd, unsigned long length)
+static inline long ksys_ftruncate(unsigned int fd, loff_t length)
{
return do_sys_ftruncate(fd, length, 1);
}
Powered by blists - more mailing lists