[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YjWewxFJ1TmT+wFy@kroah.com>
Date: Sat, 19 Mar 2022 10:13:39 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: stable@...r.kernel.org
Cc: Lucas Wei <lucaswei@...gle.com>, linux-kernel@...r.kernel.org
Subject: [PATCH v4.19.y] fs: sysfs_emit: Remove PAGE_SIZE alignment check
From: Lucas Wei <lucaswei@...gle.com>
For kernel releases older than 4.20, using the SLUB alloctor will cause
this alignment check to fail as that allocator did NOT align kmalloc
allocations on a PAGE_SIZE boundry.
Remove the check for these older kernels as it is a false-positive and
causes problems on many devices.
Signed-off-by: Lucas Wei <lucaswei@...gle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -567,8 +567,7 @@
va_list args;
int len;
- if (WARN(!buf || offset_in_page(buf),
- "invalid sysfs_emit: buf:%p\n", buf))
+ if (WARN(!buf, "invalid sysfs_emit: buf:%p\n", buf))
return 0;
va_start(args, fmt);
Powered by blists - more mailing lists