]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fix a braino in compat_sys_getrlimit()
authorAl Viro <viro@ZenIV.linux.org.uk>
Wed, 12 Jul 2017 03:59:45 +0000 (04:59 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Jul 2017 16:15:00 +0000 (09:15 -0700)
Reported-and-tested-by: Meelis Roos <mroos@linux.ee>
Fixes: commit d9e968cb9f84 "getrlimit()/setrlimit(): move compat to native"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sys.c

index 73fc0af147d02699cae7b1317816776e81b38af1..2855ee73acd0ef9f62699ff669659e045df84422 100644 (file)
@@ -1362,7 +1362,7 @@ COMPAT_SYSCALL_DEFINE2(getrlimit, unsigned int, resource,
 
        ret = do_prlimit(current, resource, NULL, &r);
        if (!ret) {
-               struct rlimit r32;
+               struct compat_rlimit r32;
                if (r.rlim_cur > COMPAT_RLIM_INFINITY)
                        r32.rlim_cur = COMPAT_RLIM_INFINITY;
                else