From 12c4911fb8d891b0d0247a1ad386b0e274cb2803 Mon Sep 17 00:00:00 2001 From: Yang Yingliang Date: Mon, 15 Mar 2021 17:47:51 +0800 Subject: [PATCH] sysfs: fix kabi broken when add sysfs_emit and sysfs_emit_at hulk inclusion category: bugfix bugzilla: NA CVE: CVE-2021-27365 --------------------------- It's introduced by 5bf67c8c2d947 ("sysfs: Add sysfs_emit and..."). Fix it by remove include mm.h. Signed-off-by: Yang Yingliang Reviewed-by: zhangyi (F) Signed-off-by: Yang Yingliang Signed-off-by: Cheng Jian --- fs/sysfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 74de104f8f33..ba8a7daa994f 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "sysfs.h" #include "../kernfs/kernfs-internal.h" @@ -560,6 +559,7 @@ void sysfs_remove_bin_file(struct kobject *kobj, } EXPORT_SYMBOL_GPL(sysfs_remove_bin_file); +#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) /** * sysfs_emit - scnprintf equivalent, aware of PAGE_SIZE buffer. * @buf: start of PAGE_SIZE buffer. -- GitLab