Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10ddfb49 authored by Lucas Wei's avatar Lucas Wei Committed by Greg Kroah-Hartman
Browse files

fs: sysfs_emit: Remove PAGE_SIZE alignment check



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: default avatarLucas Wei <lucaswei@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent deebce9d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -572,8 +572,7 @@ int sysfs_emit(char *buf, const char *fmt, ...)
	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);