kernel core: use helpers for rlimits
authorJiri Slaby <jslaby@suse.cz>
Fri, 5 Mar 2010 21:42:54 +0000 (13:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Mar 2010 19:26:33 +0000 (11:26 -0800)
commit78d7d407b62a021e6d2e8dc24c0b90e390ab58a1
tree8c1074b84db4b977bad6802a3701e0113c0a7739
parentd4bb527438b4181cd3c564ae04dd344c381283a1
kernel core: use helpers for rlimits

Make sure compiler won't do weird things with limits.  E.g.  fetching them
twice may return 2 different values after writable limits are implemented.

I.e.  either use rlimit helpers added in commit 3e10e716abf3 ("resource:
add helpers for fetching rlimits") or ACCESS_ONCE if not applicable.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/fork.c
kernel/perf_event.c
kernel/posix-cpu-timers.c
kernel/sched.c
kernel/sched_rt.c
kernel/signal.c
kernel/sys.c