From: Greg Kroah-Hartman Date: Sat, 19 Mar 2022 12:34:18 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v5.4.186~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb08929b1ecfbfb12b29eb8aace7657ab68ada41;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: fs-sysfs_emit-remove-page_size-alignment-check.patch --- diff --git a/queue-4.19/fs-sysfs_emit-remove-page_size-alignment-check.patch b/queue-4.19/fs-sysfs_emit-remove-page_size-alignment-check.patch new file mode 100644 index 00000000000..d97fc897d18 --- /dev/null +++ b/queue-4.19/fs-sysfs_emit-remove-page_size-alignment-check.patch @@ -0,0 +1,32 @@ +From c673bd369face4e179aa0463b862f5a77dabd808 Mon Sep 17 00:00:00 2001 +From: Lucas Wei +Date: Fri, 18 Mar 2022 15:14:01 +0800 +Subject: fs: sysfs_emit: Remove PAGE_SIZE alignment check + +From: Lucas Wei + +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 +Signed-off-by: Greg Kroah-Hartman +--- + fs/sysfs/file.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/fs/sysfs/file.c ++++ b/fs/sysfs/file.c +@@ -572,8 +572,7 @@ int sysfs_emit(char *buf, const char *fm + 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); diff --git a/queue-4.19/series b/queue-4.19/series index e830078597f..3b0c47271ad 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -19,3 +19,4 @@ sched-topology-fix-sched_domain_topology_level-alloc-in-sched_init_numa.patch ia64-ensure-proper-numa-distance-and-possible-map-initialization.patch cpuset-fix-unsafe-lock-order-between-cpuset-lock-and-cpuslock.patch mm-fix-dereference-a-null-pointer-in-migrate_page_move_mapping.patch +fs-sysfs_emit-remove-page_size-alignment-check.patch