From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasily Averin Subject: [PATCH TTY] memcg: drop GFP_KERNEL_ACCOUNT use in tty_save_termios() Date: Tue, 27 Jul 2021 12:26:12 +0300 Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:Subject :From; bh=aA4OKvIJX54mPh9QQGvJAgE1NSRLlK28/A5Ft+jS4wk=; b=jEfB9MJFSdPNiqdCXAZ 3Z62IS2ffQzJuMY15RKM/nZj2NYL3YFhbyT+VsHbbsPTdRe+NwSfHQGgrtyYhaB99zj3vqsE9f1If Spm8IT/7BVz3qp2ClvJzlF10US7VmxGpWgxtKo3esF27NAaRlPfO6ZBAwV4PiZMazGttnQltqCg=; In-Reply-To: Content-Language: en-US List-ID: Content-Type: text/plain; charset="us-ascii" To: Jiri Slaby , Greg Kroah-Hartman Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 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 Fixes: 854dd8a572a0 ("memcg: enable accounting for tty-related objects") Signed-off-by: Vasily Averin --- 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