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 3e10e716 ("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>
Showing
- kernel/fork.c 6 additions, 4 deletionskernel/fork.c
- kernel/perf_event.c 1 addition, 1 deletionkernel/perf_event.c
- kernel/posix-cpu-timers.c 6 additions, 4 deletionskernel/posix-cpu-timers.c
- kernel/sched.c 2 additions, 2 deletionskernel/sched.c
- kernel/sched_rt.c 3 additions, 2 deletionskernel/sched_rt.c
- kernel/signal.c 1 addition, 1 deletionkernel/signal.c
- kernel/sys.c 1 addition, 2 deletionskernel/sys.c
Loading
Please register or sign in to comment