Bug#218657: the latest libc6 + 2.6 kernel problem
Andi Kleen and David Miller believe this bug, or at the least the
symptoms of statfs64(), are caused by a bug in the kernel. Here is the
proposed patch:
--- fs/compat.c.~1~ Wed Nov 12 16:09:49 2003
+++ fs/compat.c Wed Nov 12 16:10:35 2003
@@ -169,7 +169,6 @@
static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbuf)
{
-
if (sizeof ubuf->f_blocks == 4) {
if ((kbuf->f_blocks | kbuf->f_bfree |
kbuf->f_bavail | kbuf->f_files | kbuf->f_ffree) &
@@ -192,10 +191,13 @@
return 0;
}
-asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf)
+asmlinkage long compat_statfs64(const char *path, compat_size_t sz, struct compat_statfs64 *buf)
{
struct nameidata nd;
int error;
+
+ if (sz != sizeof(*buf))
+ return -EINVAL;
error = user_path_walk(path, &nd);
if (!error) {
Reply to: