mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit
authorJoe Perches <joe@perches.com>
Wed, 16 Sep 2020 20:40:43 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 11:16:33 +0000 (13:16 +0200)
commit7981593bf083801035b1f1377661849805acb216
tree2bbda781606b0bdc05ca2f183a84919d9d5659d3
parent948b3edba8988306b635578a72b0dab6091a5eb0
mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit

Convert the unbound sprintf in hugetlb_report_node_meminfo to use
sysfs_emit_at so that no possible overrun of a PAGE_SIZE buf can occur.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Link: https://lore.kernel.org/r/894b351b82da6013cde7f36ff4b5493cd0ec30d0.1600285923.git.joe@perches.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/node.c
include/linux/hugetlb.h
mm/hugetlb.c