Skip to content

Commit

Permalink
fix a braino in compat_sys_getrlimit()
Browse files Browse the repository at this point in the history
Reported-and-tested-by: Meelis Roos <mroos@linux.ee>
Fixes: commit d9e968c "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>
  • Loading branch information
Al Viro authored and torvalds committed Jul 12, 2017
1 parent 3b06b1a commit 58c7ffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58c7ffc

Please sign in to comment.