[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YP/Sl8a5PqUFZAi5@kroah.com>
Date: Tue, 27 Jul 2021 11:32:07 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Vasily Averin <vvs@...tuozzo.com>
Cc: Jiri Slaby <jirislaby@...nel.org>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH TTY] memcg: drop GFP_KERNEL_ACCOUNT use in
tty_save_termios()
On Tue, Jul 27, 2021 at 12:26:12PM +0300, Vasily Averin wrote:
> Jiri Slaby pointed that termios are not saved for PTYs and for other
> terminals used inside containers. Therefore accounting for saved
> termios have near to zero impact in real life scenarios.
>
> Cc: Jiri Slaby <jirislaby@...nel.org>
> Fixes: 854dd8a572a0 ("memcg: enable accounting for tty-related objects")
> Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
> ---
> drivers/tty/tty_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index e787f6f..a6230b2 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -1493,7 +1493,7 @@ void tty_save_termios(struct tty_struct *tty)
> /* Stash the termios data */
> tp = tty->driver->termios[idx];
> if (tp == NULL) {
> - tp = kmalloc(sizeof(*tp), GFP_KERNEL_ACCOUNT);
> + tp = kmalloc(sizeof(*tp), GFP_KERNEL);
> if (tp == NULL)
> return;
> tty->driver->termios[idx] = tp;
> --
> 1.8.3.1
>
I can just drop the original patch from my tree, it has not gone into my
unmutable branch yet.
thanks,
greg k-h
Powered by blists - more mailing lists