diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-09-03 19:21:45 +0200 |
---|---|---|
committer | Jiri Slaby <jirislaby@gmail.com> | 2010-07-16 09:48:46 +0200 |
commit | 2fb9d2689a0041b88b25bc3187eada2968e25995 (patch) | |
tree | 28c25b5092a209cd55d5d3f29dea827bdde70abe /security/selinux | |
parent | 5ab46b345e418747b3a52f0892680c0745c4223c (diff) | |
download | blackbird-op-linux-2fb9d2689a0041b88b25bc3187eada2968e25995.tar.gz blackbird-op-linux-2fb9d2689a0041b88b25bc3187eada2968e25995.zip |
rlimits: make sure ->rlim_max never grows in sys_setrlimit
Mostly preparation for Jiri's changes, but probably makes sense anyway.
sys_setrlimit() checks new_rlim.rlim_max <= old_rlim->rlim_max, but when
it takes task_lock() old_rlim->rlim_max can be already lowered. Move this
check under task_lock().
Currently this is not important, we can only race with our sub-thread,
this means the application is stupid. But when we change the code to allow
the update of !current task's limits, it becomes important to make sure
->rlim_max can be lowered "reliably" even if we race with the application
doing sys_setrlimit().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'security/selinux')
0 files changed, 0 insertions, 0 deletions