]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Jan 2021 11:56:46 +0000 (12:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Jan 2021 11:56:46 +0000 (12:56 +0100)
added patches:
drm-panfrost-remove-unused-variables-in-panfrost_job_close.patch
regmap-debugfs-fix-a-reversed-if-statement-in-regmap_debugfs_init.patch
tools-headers-uapi-sync-linux-fscrypt.h-with-the-kernel-sources.patch

queue-5.10/drm-panfrost-remove-unused-variables-in-panfrost_job_close.patch [new file with mode: 0644]
queue-5.10/regmap-debugfs-fix-a-reversed-if-statement-in-regmap_debugfs_init.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/tools-headers-uapi-sync-linux-fscrypt.h-with-the-kernel-sources.patch [new file with mode: 0644]

diff --git a/queue-5.10/drm-panfrost-remove-unused-variables-in-panfrost_job_close.patch b/queue-5.10/drm-panfrost-remove-unused-variables-in-panfrost_job_close.patch
new file mode 100644 (file)
index 0000000..f5cc85d
--- /dev/null
@@ -0,0 +1,34 @@
+From 7d6763ab77b3c047cf7d31ca7c4b799808a684a6 Mon Sep 17 00:00:00 2001
+From: Boris Brezillon <boris.brezillon@collabora.com>
+Date: Sun, 1 Nov 2020 18:38:17 +0100
+Subject: drm/panfrost: Remove unused variables in panfrost_job_close()
+
+From: Boris Brezillon <boris.brezillon@collabora.com>
+
+commit 7d6763ab77b3c047cf7d31ca7c4b799808a684a6 upstream.
+
+Commit a17d609e3e21 ("drm/panfrost: Don't corrupt the queue mutex on
+open/close") left unused variables behind, thus generating a warning
+at compilation time. Remove those variables.
+
+Fixes: a17d609e3e21 ("drm/panfrost: Don't corrupt the queue mutex on open/close")
+Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
+Reviewed-by: Steven Price <steven.price@arm.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20201101173817.831769-1-boris.brezillon@collabora.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/panfrost/panfrost_job.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/gpu/drm/panfrost/panfrost_job.c
++++ b/drivers/gpu/drm/panfrost/panfrost_job.c
+@@ -676,8 +676,6 @@ int panfrost_job_open(struct panfrost_fi
+ void panfrost_job_close(struct panfrost_file_priv *panfrost_priv)
+ {
+-      struct panfrost_device *pfdev = panfrost_priv->pfdev;
+-      struct panfrost_job_slot *js = pfdev->js;
+       int i;
+       for (i = 0; i < NUM_JOB_SLOTS; i++)
diff --git a/queue-5.10/regmap-debugfs-fix-a-reversed-if-statement-in-regmap_debugfs_init.patch b/queue-5.10/regmap-debugfs-fix-a-reversed-if-statement-in-regmap_debugfs_init.patch
new file mode 100644 (file)
index 0000000..05930b9
--- /dev/null
@@ -0,0 +1,37 @@
+From f6bcb4c7f366905b66ce8ffca7190118244bb642 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Tue, 5 Jan 2021 14:42:29 +0300
+Subject: regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit f6bcb4c7f366905b66ce8ffca7190118244bb642 upstream.
+
+This code will leak "map->debugfs_name" because the if statement is
+reversed so it only frees NULL pointers instead of non-NULL.  In
+fact the if statement is not required and should just be removed
+because kfree() accepts NULL pointers.
+
+Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Link: https://lore.kernel.org/r/X/RQpfAwRdLg0GqQ@mwanda
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/regmap/regmap-debugfs.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/base/regmap/regmap-debugfs.c
++++ b/drivers/base/regmap/regmap-debugfs.c
+@@ -594,9 +594,7 @@ void regmap_debugfs_init(struct regmap *
+       }
+       if (!strcmp(name, "dummy")) {
+-              if (!map->debugfs_name)
+-                      kfree(map->debugfs_name);
+-
++              kfree(map->debugfs_name);
+               map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
+                                               dummy_index);
+               if (!map->debugfs_name)
index 47ba07ad3fd559174d7dc5c6a07e0c05c54f3006..fb68562b1ce47acbf03a3a0a3b9f505167349bfe 100644 (file)
@@ -98,3 +98,6 @@ block-rnbd-clt-avoid-module-unload-race-with-close-confirmation.patch
 can-isotp-isotp_getname-fix-kernel-information-leak.patch
 block-fix-use-after-free-in-disk_part_iter_next.patch
 net-drop-bogus-skb-with-checksum_partial-and-offset-beyond-end-of-trimmed-packet.patch
+regmap-debugfs-fix-a-reversed-if-statement-in-regmap_debugfs_init.patch
+drm-panfrost-remove-unused-variables-in-panfrost_job_close.patch
+tools-headers-uapi-sync-linux-fscrypt.h-with-the-kernel-sources.patch
diff --git a/queue-5.10/tools-headers-uapi-sync-linux-fscrypt.h-with-the-kernel-sources.patch b/queue-5.10/tools-headers-uapi-sync-linux-fscrypt.h-with-the-kernel-sources.patch
new file mode 100644 (file)
index 0000000..78f6bf0
--- /dev/null
@@ -0,0 +1,59 @@
+From 4a443a51776ca9847942523cf987a330894d3a31 Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Thu, 17 Dec 2020 14:58:51 -0300
+Subject: tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+commit 4a443a51776ca9847942523cf987a330894d3a31 upstream.
+
+To pick the changes from:
+
+  3ceb6543e9cf6ed8 ("fscrypt: remove kernel-internal constants from UAPI header")
+
+That don't result in any changes in tooling, just addressing this perf
+build warning:
+
+  Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h'
+  diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h
+
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Eric Biggers <ebiggers@google.com>
+Cc: Ian Rogers <irogers@google.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/include/uapi/linux/fscrypt.h |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/tools/include/uapi/linux/fscrypt.h
++++ b/tools/include/uapi/linux/fscrypt.h
+@@ -20,7 +20,6 @@
+ #define FSCRYPT_POLICY_FLAG_DIRECT_KEY                0x04
+ #define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64    0x08
+ #define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32    0x10
+-#define FSCRYPT_POLICY_FLAGS_VALID            0x1F
+ /* Encryption algorithms */
+ #define FSCRYPT_MODE_AES_256_XTS              1
+@@ -28,7 +27,7 @@
+ #define FSCRYPT_MODE_AES_128_CBC              5
+ #define FSCRYPT_MODE_AES_128_CTS              6
+ #define FSCRYPT_MODE_ADIANTUM                 9
+-#define __FSCRYPT_MODE_MAX                    9
++/* If adding a mode number > 9, update FSCRYPT_MODE_MAX in fscrypt_private.h */
+ /*
+  * Legacy policy version; ad-hoc KDF and no key verification.
+@@ -177,7 +176,7 @@ struct fscrypt_get_key_status_arg {
+ #define FS_POLICY_FLAGS_PAD_32                FSCRYPT_POLICY_FLAGS_PAD_32
+ #define FS_POLICY_FLAGS_PAD_MASK      FSCRYPT_POLICY_FLAGS_PAD_MASK
+ #define FS_POLICY_FLAG_DIRECT_KEY     FSCRYPT_POLICY_FLAG_DIRECT_KEY
+-#define FS_POLICY_FLAGS_VALID         FSCRYPT_POLICY_FLAGS_VALID
++#define FS_POLICY_FLAGS_VALID         0x07    /* contains old flags only */
+ #define FS_ENCRYPTION_MODE_INVALID    0       /* never used */
+ #define FS_ENCRYPTION_MODE_AES_256_XTS        FSCRYPT_MODE_AES_256_XTS
+ #define FS_ENCRYPTION_MODE_AES_256_GCM        2       /* never used */