diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-01-27 17:32:22 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-01-27 15:17:31 -0800 |
commit | 2854e72b58dad82f5248b30a45dda0df49e5fe05 (patch) | |
tree | 6fb25ecf139c223fbb6d6c25e31ff1d2f93ec668 /arch/x86/ia32 | |
parent | be8cde8b24c9dca1e54598690115eee5b1476519 (diff) | |
download | kernel_samsung_smdk4412-2854e72b58dad82f5248b30a45dda0df49e5fe05.tar.gz kernel_samsung_smdk4412-2854e72b58dad82f5248b30a45dda0df49e5fe05.tar.bz2 kernel_samsung_smdk4412-2854e72b58dad82f5248b30a45dda0df49e5fe05.zip |
x86: Use helpers for rlimits
Make sure compiler won't do weird things with limits. Fetching them
twice may return 2 different values after writable limits are
implemented.
We can either use rlimit helpers added in
3e10e716abf3c71bdb5d86b8f507f9e72236c9cd or ACCESS_ONCE if not
applicable; this patch uses the helpers.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
LKML-Reference: <1264609942-24621-1-git-send-email-jslaby@suse.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r-- | arch/x86/ia32/ia32_aout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 2a4d073d2cf..06474788723 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c @@ -297,7 +297,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) * size limits imposed on them by creating programs with large * arrays in the data or bss. */ - rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; + rlim = rlimit(RLIMIT_DATA); if (rlim >= RLIM_INFINITY) rlim = ~0; if (ex.a_data + ex.a_bss > rlim) |