From: Greg Kroah-Hartman Date: Fri, 15 Jan 2021 11:56:46 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v4.4.252~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a1028684e3f4c01dbaf86e363869218492ce0f63;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches 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 --- 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 index 00000000000..f5cc85d39b1 --- /dev/null +++ b/queue-5.10/drm-panfrost-remove-unused-variables-in-panfrost_job_close.patch @@ -0,0 +1,34 @@ +From 7d6763ab77b3c047cf7d31ca7c4b799808a684a6 Mon Sep 17 00:00:00 2001 +From: Boris Brezillon +Date: Sun, 1 Nov 2020 18:38:17 +0100 +Subject: drm/panfrost: Remove unused variables in panfrost_job_close() + +From: Boris Brezillon + +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 +Reviewed-by: Steven Price +Link: https://patchwork.freedesktop.org/patch/msgid/20201101173817.831769-1-boris.brezillon@collabora.com +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..05930b96c1b --- /dev/null +++ b/queue-5.10/regmap-debugfs-fix-a-reversed-if-statement-in-regmap_debugfs_init.patch @@ -0,0 +1,37 @@ +From f6bcb4c7f366905b66ce8ffca7190118244bb642 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Tue, 5 Jan 2021 14:42:29 +0300 +Subject: regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init() + +From: Dan Carpenter + +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 +Link: https://lore.kernel.org/r/X/RQpfAwRdLg0GqQ@mwanda +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + 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) diff --git a/queue-5.10/series b/queue-5.10/series index 47ba07ad3fd..fb68562b1ce 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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 index 00000000000..78f6bf03084 --- /dev/null +++ b/queue-5.10/tools-headers-uapi-sync-linux-fscrypt.h-with-the-kernel-sources.patch @@ -0,0 +1,59 @@ +From 4a443a51776ca9847942523cf987a330894d3a31 Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +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 + +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 +Cc: Eric Biggers +Cc: Ian Rogers +Cc: Jiri Olsa +Cc: Namhyung Kim +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman + +--- + 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 */