[PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers
[deliverable/linux.git] / arch / mips / kernel / linux32.c
index 52cada45b3538f6012b3dac0750a8f1fb06e3da0..53f4171fc188a9695eb094b6a4ddda7977af349c 100644 (file)
@@ -77,6 +77,8 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
        memset(&tmp, 0, sizeof(tmp));
        tmp.st_dev = new_encode_dev(stat->dev);
        tmp.st_ino = stat->ino;
+       if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino)
+               return -EOVERFLOW;
        tmp.st_mode = stat->mode;
        tmp.st_nlink = stat->nlink;
        SET_UID(tmp.st_uid, stat->uid);
This page took 0.026467 seconds and 5 git commands to generate.