lkml.org 
[lkml]   [2017]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/4][PoC][RFC] Connect rlimit-events with process life cycle
From
Date


On 10/19/2017 09:41 AM, Greg KH wrote:
> On Wed, Oct 18, 2017 at 10:32:29PM +0200, Krzysztof Opasiak wrote:
>> Add rlimit-events call to process lifecycle to ensure that
>> we get notified whenever process dies (to cleanup our watch
>> levels) or forks (to implement watch levels inheritance).
>>
>> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
>> ---
>> kernel/exit.c | 4 ++++
>> kernel/fork.c | 16 +++++++++++++++-
>> 2 files changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/exit.c b/kernel/exit.c
>> index 516acdb0e0ec..c7e435ac4428 100644
>> --- a/kernel/exit.c
>> +++ b/kernel/exit.c
>> @@ -62,6 +62,7 @@
>> #include <linux/kcov.h>
>> #include <linux/random.h>
>> #include <linux/rcuwait.h>
>> +#include <linux/rlimit_noti.h>
>>
>> #include <linux/uaccess.h>
>> #include <asm/unistd.h>
>> @@ -858,6 +859,9 @@ void __noreturn do_exit(long code)
>> if (group_dead)
>> tty_audit_exit();
>> audit_free(tsk);
>> +#ifdef CONFIG_RLIMIT_NOTIFICATION
>> + rlimit_noti_task_exit(tsk);
>> +#endif
>
> #ifdef should not be needed in a .c file :(
>

Yeah, I should have dropped them as it's solved in header by defining
this function as empty when rlimit-events are disabled.

Best regards,
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

\
 
 \ /
  Last update: 2017-10-22 17:29    [W:0.067 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site