Commit 6ba98438 authored by Joe Perches's avatar Joe Perches Committed by Yongqiang Liu
Browse files

drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show

mainline inclusion
from mainline-v5.10-rc1
commit e015e036
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I5C32F


CVE: CVE-2022-20166

--------------------------------------------------

Do not indirect the bitmap printing of these shared_cpu show functions by
using cpumap_print_to_pagebuf/bitmap_print_to_pagebuf.

Use the more typical style with the vsnprintf %*pb and %*pbl extensions
directly so there is no possible mixup about the use of offset_in_page(buf)
by bitmap_print_to_pagebuf.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/80457b467ab6cde13a173cfd8a4f49cd8467a7fd.1600285923.git.joe@perches.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 495e6e31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment