From: Yang Yingliang yangyingliang@huawei.com
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 yangyingliang@huawei.com Reviewed-by: zhangyi (F) yi.zhang@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com Signed-off-by: Cheng Jian cj.chengjian@huawei.com --- 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 <linux/list.h> #include <linux/mutex.h> #include <linux/seq_file.h> -#include <linux/mm.h>
#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.