]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Mar 2022 12:34:12 +0000 (13:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Mar 2022 12:34:12 +0000 (13:34 +0100)
added patches:
fs-sysfs_emit-remove-page_size-alignment-check.patch

queue-4.14/fs-sysfs_emit-remove-page_size-alignment-check.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/fs-sysfs_emit-remove-page_size-alignment-check.patch b/queue-4.14/fs-sysfs_emit-remove-page_size-alignment-check.patch
new file mode 100644 (file)
index 0000000..e3c15bc
--- /dev/null
@@ -0,0 +1,32 @@
+From c673bd369face4e179aa0463b862f5a77dabd808 Mon Sep 17 00:00:00 2001
+From: Lucas Wei <lucaswei@google.com>
+Date: Fri, 18 Mar 2022 15:14:01 +0800
+Subject: fs: sysfs_emit: Remove PAGE_SIZE alignment check
+
+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>
+---
+ fs/sysfs/file.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/fs/sysfs/file.c
++++ b/fs/sysfs/file.c
+@@ -565,8 +565,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);
index 1e87b540e880c7c61cb38dfed51cec8e0a77191c..f4831d031fdc80acd4c240ee8967a6b443829bf5 100644 (file)
@@ -11,3 +11,4 @@ nl80211-update-bss-channel-on-channel-switch-for-p2p.patch
 tcp-make-tcp_read_sock-more-robust.patch
 sfc-extend-the-locking-on-mcdi-seqno.patch
 kselftest-vm-fix-tests-build-with-old-libc.patch
+fs-sysfs_emit-remove-page_size-alignment-check.patch