summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2017-06-16 16:21:44 +0200
committerRichard Weinberger <richard@nod.at>2017-07-14 22:50:52 +0200
commit4acadda74ff8b949c448c0282765ae747e088c87 (patch)
treef352b5b37c1f1da4f73e2e8c1bccea9b05c767dd /fs/ceph
parentubifs: Change gfp flags in page allocation for bulk read (diff)
downloadlinux-4acadda74ff8b949c448c0282765ae747e088c87.tar.xz
linux-4acadda74ff8b949c448c0282765ae747e088c87.zip
ubifs: Don't leak kernel memory to the MTD
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. Cc: stable@vger.kernel.org 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>
Diffstat (limited to 'fs/ceph')
0 files changed, 0 insertions, 0 deletions