]> git.baikalelectronics.ru Git - kernel.git/commit
rlimit: Rewrite non-sensical RLIMIT_CPU comment
authorThomas Gleixner <tglx@linutronix.de>
Wed, 21 Aug 2019 19:09:18 +0000 (21:09 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Aug 2019 09:50:40 +0000 (11:50 +0200)
commitebb6fe3bc8fe8f3b22204cae9fed518373b483e1
tree8fa82b8396f2ff24425784ffb5cc67463495fa62
parent1fd09d9c75e58e5c9b62589f7583b647cd83685b
rlimit: Rewrite non-sensical RLIMIT_CPU comment

The comment above the function which arms RLIMIT_CPU in the posix CPU timer
code makes no sense at all. It claims that the kernel does not return an
error code when it rejected the attempt to set RLIMIT_CPU. That's clearly
bogus as the code does an error check and the rlimit is only set and
activated when the permission checks are ok. In case of a rejection an
appropriate error code is returned.

This is a historical and outdated comment which got dragged along even when
the rlimit handling code was rewritten.

Replace it with an explanation why the setup function is not called when
the rlimit value is RLIM_INFINITY and how the 'disarming' is handled.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190821192922.185511287@linutronix.de
kernel/sys.c