summaryrefslogtreecommitdiff
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2017-06-16 14:21:44 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-27 22:08:04 (GMT)
commitec469b5e2aafdcedbc80d9a7a8a4fa8632e584e3 (patch)
tree025e8a2e8d9dc15ac35b0d8711cd46e1730c8243 /drivers/acpi/ec.c
parent02131aea6bd4d7a1414333160124b6a078b262fe (diff)
downloadlinux-ec469b5e2aafdcedbc80d9a7a8a4fa8632e584e3.tar.xz
ubifs: Don't leak kernel memory to the MTD
commit 4acadda74ff8b949c448c0282765ae747e088c87 upstream. When UBIFS prepares data structures which will be written to the MTD it ensues that their lengths are multiple of 8. Since it uses kmalloc() the padded bytes are left uninitialized and we leak a few bytes of kernel memory to the MTD. To make sure that all bytes are initialized, let's switch to kzalloc(). Kzalloc() is fine in this case because the buffers are not huge and in the IO path the performance bottleneck is anyway the MTD. Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/ec.c')
0 files changed, 0 insertions, 0 deletions