[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171019074141.GE20787@kroah.com>
Date: Thu, 19 Oct 2017 09:41:41 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Krzysztof Opasiak <k.opasiak@...sung.com>
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 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 :(
Powered by blists - more mailing lists