memcg_write_event_control(): fix a user-triggerable oops
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 21 Jul 2024 18:45:08 +0000 (14:45 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 13 Aug 2024 01:58:44 +0000 (21:58 -0400)
commit046667c4d3196938e992fba0dfcde570aa85cd0e
tree282b1588197e90255a770e210c92fa3820e38157
parent9a2fa1472083580b6c66bdaf291f591e1170123a
memcg_write_event_control(): fix a user-triggerable oops

we are *not* guaranteed that anything past the terminating NUL
is mapped (let alone initialized with anything sane).

Fixes: 0dea116876ee ("cgroup: implement eventfd-based generic API for notifications")
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mm/memcontrol-v1.c