diff options
author | Kees Cook <kees.cook@canonical.com> | 2009-09-22 19:45:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:40 -0400 |
commit | cff4edb591c153a779a27a3fd8e7bc1217f2f6b8 (patch) | |
tree | 664f2a20cd0ae38ef06a2f8cc59e5ffca13e5d8b /fs | |
parent | 27f6cb160b71b342b7a47d28a4b6c422ea74ccd1 (diff) |
proc: fix reported unit for RLIMIT_CPU
/proc/$pid/limits should show RLIMIT_CPU as seconds, which is the unit
used in kernel/posix-cpu-timers.c:
unsigned long psecs = cputime_to_secs(ptime);
...
if (psecs >= sig->rlim[RLIMIT_CPU].rlim_max) {
...
__group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 55c4c805a756..69bb70351b9b 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -458,7 +458,7 @@ struct limit_names { | |||
458 | }; | 458 | }; |
459 | 459 | ||
460 | static const struct limit_names lnames[RLIM_NLIMITS] = { | 460 | static const struct limit_names lnames[RLIM_NLIMITS] = { |
461 | [RLIMIT_CPU] = {"Max cpu time", "ms"}, | 461 | [RLIMIT_CPU] = {"Max cpu time", "seconds"}, |
462 | [RLIMIT_FSIZE] = {"Max file size", "bytes"}, | 462 | [RLIMIT_FSIZE] = {"Max file size", "bytes"}, |
463 | [RLIMIT_DATA] = {"Max data size", "bytes"}, | 463 | [RLIMIT_DATA] = {"Max data size", "bytes"}, |
464 | [RLIMIT_STACK] = {"Max stack size", "bytes"}, | 464 | [RLIMIT_STACK] = {"Max stack size", "bytes"}, |