浏览代码

Update v5.9 patches

Changes:
 - SAM:
   - Clean up code

 - Misc:
   - Revert erroneous efivarfs change in v5.4.80

Links:
 - SAM: https://github.com/linux-surface/surface-aggregator-module/commit/b97b5d8f9e699ac88f69a91bd1747b2203581185
 - kernel: https://github.com/linux-surface/kernel/commit/9888cb1662207471659e5458d3ee4edcec3bb5b8
Maximilian Luz 4 年之前
父节点
当前提交
acd1277597

文件差异内容过多而无法显示
+ 159 - 175
patches/5.9/0006-surface-sam.patch


+ 1 - 1
patches/5.9/0007-surface-typecover.patch

@@ -1,4 +1,4 @@
-From a210b2578d679f682b28223666f559a429484763 Mon Sep 17 00:00:00 2001
+From f31c0f964fe152914e4745e0b5fd358d43127ef6 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
 Date: Thu, 5 Nov 2020 13:09:45 +0100
 Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when

+ 50 - 0
patches/5.9/0008-efivarfs-revert-fix-memory-leak-in-efivarfs_create.patch

@@ -0,0 +1,50 @@
+From e3a4b0234c813584d5bca2d9731b20a8e325e6d9 Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb@kernel.org>
+Date: Wed, 25 Nov 2020 08:53:03 +0100
+Subject: [PATCH] efivarfs: revert "fix memory leak in efivarfs_create()"
+
+The memory leak addressed by commit fe5186cf12e3 is a false positive:
+all allocations are recorded in a linked list, and freed when the
+filesystem is unmounted. This leads to double frees, and as reported
+by David, leads to crashes if SLUB is configured to self destruct when
+double frees occur.
+
+So drop the redundant kfree() again, and instead, mark the offending
+pointer variable so the allocation is ignored by kmemleak.
+
+Cc: Vamshi K Sthambamkadi <vamshi.k.sthambamkadi@gmail.com>
+Fixes: fe5186cf12e3 ("efivarfs: fix memory leak in efivarfs_create()")
+Reported-by: David Laight <David.Laight@aculab.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+---
+ fs/efivarfs/inode.c | 1 +
+ fs/efivarfs/super.c | 1 -
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c
+index 96c0c86f3fff..38324427a2b3 100644
+--- a/fs/efivarfs/inode.c
++++ b/fs/efivarfs/inode.c
+@@ -103,6 +103,7 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry,
+ 	var->var.VariableName[i] = '\0';
+ 
+ 	inode->i_private = var;
++	kmemleak_ignore(var);
+ 
+ 	err = efivar_entry_add(var, &efivarfs_list);
+ 	if (err)
+diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
+index f943fd0b0699..15880a68faad 100644
+--- a/fs/efivarfs/super.c
++++ b/fs/efivarfs/super.c
+@@ -21,7 +21,6 @@ LIST_HEAD(efivarfs_list);
+ static void efivarfs_evict_inode(struct inode *inode)
+ {
+ 	clear_inode(inode);
+-	kfree(inode->i_private);
+ }
+ 
+ static const struct super_operations efivarfs_ops = {
+-- 
+2.29.2
+

+ 2 - 2
pkg/arch/kernel/PKGBUILD

@@ -48,8 +48,8 @@ sha256sums=('5d7560465abd0b5fccee96084eb374afd1b66e8fb9e0b6b6088a737ba5c48ee0'
             'a782eea056c00efc4d3a970be37e1534143b5acdcf673619ec744d4b47870a20'
             'da92c82cd32b1fa8f7ee85975d52ea9447444a75b631e861a060772e8a2ece8d'
             '9d682de8a2351aeab4a237a34b4c319d31c1b241bc1c18f89f090cd477e48ddc'
-            'ceb5726ed1fd9ef224e71d011b2410aeb6894daeeaa5bb176f58c650f9e39a47'
-            '03d55c690b6ecddea74935f9f728bc1ef00ae97b5a443434361ba9ca4e7d160c')
+            '7dc6d6a8789a6260a88247fef051378ef33c74016ef31b8985119f196b3395a9'
+            '1bd5846516e6f414dc996a442cf742e6bc43c3814716706ab7bb41885954aeb8')
 
 
 export KBUILD_BUILD_HOST=archlinux

部分文件因为文件数量过多而无法显示