[PATCH 0/2] use bin_attribute to avoid buff overflow

From: Tian Tao
Date: Mon May 31 2021 - 22:57:09 EST


The first patch adds a new function cpumap_print_to_buf and uses
this function in drivers/base/topology.c, and the second patch uses
this new function in drivers/base/node.c

Tian Tao (2):
topology: use bin_attribute to avoid buff overflow
drivers/base/node.c: use bin_attribute to avoid buff overflow

drivers/base/node.c | 49 +++++++++++++--------
drivers/base/topology.c | 115 ++++++++++++++++++++++++++----------------------
include/linux/bitmap.h | 3 ++
include/linux/cpumask.h | 25 +++++++++++
lib/bitmap.c | 34 ++++++++++++++
5 files changed, 156 insertions(+), 70 deletions(-)

--
2.7.4