]> git.baikalelectronics.ru Git - kernel.git/commit
tty/vt: consolemap: walk the buffer only once in con_set_trans_old()
authorJiri Slaby <jslaby@suse.cz>
Tue, 7 Jun 2022 10:49:46 +0000 (12:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:37:03 +0000 (13:37 +0200)
commitabb237fb8d1bb38791fc374689b368cd27f79109
tree1b6abb9562adf2d05a1a7b1b0a20826394fb31c5
parenta97bb00fa3fb4e5069ae1c197af109901353ac80
tty/vt: consolemap: walk the buffer only once in con_set_trans_old()

Fetch the user data one by one (by get_user()) and fill in the local
buffer simultaneously. I.e. we no longer require to walk two buffers and
save thus 256 B from stack (whole ubuf).

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-36-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/consolemap.c