From: Heiko Carstens Date: Wed, 23 Sep 2009 15:49:55 +0000 (+0200) Subject: fs: change sys_truncate length parameter type X-Git-Tag: v2.6.32-rc1~177 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fd8da8d62416d0dae05603ab5990a498d9aeb12;p=pandora-kernel.git fs: change sys_truncate length parameter type For this system call user space passes a signed long length parameter, while the kernel side takes an unsigned long parameter and converts it later to signed long again. This has led to bugs in compat wrappers see e.g. dd90bbd5 "powerpc: Add compat_sys_truncate". The s390 compat wrapper for this functions is broken as well since it also performs zero extension instead of sign extension for the length parameter. In addition if hpa comes up with an automated way of generating compat wrappers it would generate a wrong one here. So change the length parameter from unsigned long to long. Cc: "H. Peter Anvin" Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Heiko Carstens Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed