[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <d3e172e9-1382-f790-2c16-15e43458a635@samsung.com>
Date: Thu, 19 Oct 2017 20:19:16 +0200
From: Krzysztof Opasiak <k.opasiak@...sung.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: viro@...iv.linux.org.uk, arnd@...db.de,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-arch@...r.kernel.org, k.lewandowsk@...sung.com,
l.stelmach@...sung.com, p.szewczyk@...sung.com,
b.zolnierkie@...sung.com, andrzej.p@...sung.com,
kopasiak90@...il.com
Subject: Re: [PATCH 3/4][PoC][RFC] Connect rlimit-events with process life
cycle
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@...sung.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
Powered by blists - more mailing lists