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.

Fixes: 06fac184ac6b ("memcg: charge kmem allocations accounted to UBC in PCS6 
to memcg")
Signed-off-by: Vasily Averin <[email protected]>
---
 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 d003244ca1eb..0d7c2cfa3ee3 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1394,7 +1394,7 @@ void tty_save_termios(struct tty_struct *tty)
        /* Stash the termios data */
        tp = tty->driver->termios[idx];
        if (tp == NULL) {
-               tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL_ACCOUNT);
+               tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
                if (tp == NULL)
                        return;
                tty->driver->termios[idx] = tp;
-- 
2.25.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to