* [PATCH v4.19.y] fs: sysfs_emit: Remove PAGE_SIZE alignment check
@ 2022-03-19 9:13 Greg KH
0 siblings, 0 replies; only message in thread
From: Greg KH @ 2022-03-19 9:13 UTC (permalink / raw)
To: stable; +Cc: Lucas Wei, linux-kernel
From: Lucas Wei <lucaswei@google.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@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-19 9:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-19 9:13 [PATCH v4.19.y] fs: sysfs_emit: Remove PAGE_SIZE alignment check Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox