]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2024 09:03:11 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2024 09:03:11 +0000 (11:03 +0200)
added patches:
fuse-add-feature-flag-for-expire-only.patch
regulator-of-fix-a-null-vs-is_err-check-in-of_regulator_bulk_get_all.patch

queue-6.1/fuse-add-feature-flag-for-expire-only.patch [new file with mode: 0644]
queue-6.1/regulator-of-fix-a-null-vs-is_err-check-in-of_regulator_bulk_get_all.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/fuse-add-feature-flag-for-expire-only.patch b/queue-6.1/fuse-add-feature-flag-for-expire-only.patch
new file mode 100644 (file)
index 0000000..6c2c5ef
--- /dev/null
@@ -0,0 +1,54 @@
+From 5cadfbd5a11e5495cac217534c5f788168b1afd7 Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Mon, 27 Mar 2023 16:14:49 +0200
+Subject: fuse: add feature flag for expire-only
+
+From: Miklos Szeredi <mszeredi@redhat.com>
+
+commit 5cadfbd5a11e5495cac217534c5f788168b1afd7 upstream.
+
+Add an init flag idicating whether the FUSE_EXPIRE_ONLY flag of
+FUSE_NOTIFY_INVAL_ENTRY is effective.
+
+This is needed for backports of this feature, otherwise the server could
+just check the protocol version.
+
+Fixes: 4f8d37020e1f ("fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY")
+Cc: <stable@vger.kernel.org> # v6.2
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/fuse/inode.c           |    3 ++-
+ include/uapi/linux/fuse.h |    2 ++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+--- a/fs/fuse/inode.c
++++ b/fs/fuse/inode.c
+@@ -1327,7 +1327,8 @@ void fuse_send_init(struct fuse_mount *f
+               FUSE_ABORT_ERROR | FUSE_MAX_PAGES | FUSE_CACHE_SYMLINKS |
+               FUSE_NO_OPENDIR_SUPPORT | FUSE_EXPLICIT_INVAL_DATA |
+               FUSE_HANDLE_KILLPRIV_V2 | FUSE_SETXATTR_EXT | FUSE_INIT_EXT |
+-              FUSE_SECURITY_CTX;
++              FUSE_SECURITY_CTX |
++              FUSE_HAS_EXPIRE_ONLY;
+ #ifdef CONFIG_FUSE_DAX
+       if (fm->fc->dax)
+               flags |= FUSE_MAP_ALIGNMENT;
+--- a/include/uapi/linux/fuse.h
++++ b/include/uapi/linux/fuse.h
+@@ -365,6 +365,7 @@ struct fuse_file_lock {
+  * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and
+  *                    mknod
+  * FUSE_HAS_INODE_DAX:  use per inode DAX
++ * FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation
+  */
+ #define FUSE_ASYNC_READ               (1 << 0)
+ #define FUSE_POSIX_LOCKS      (1 << 1)
+@@ -401,6 +402,7 @@ struct fuse_file_lock {
+ /* bits 32..63 get shifted down 32 bits into the flags2 field */
+ #define FUSE_SECURITY_CTX     (1ULL << 32)
+ #define FUSE_HAS_INODE_DAX    (1ULL << 33)
++#define FUSE_HAS_EXPIRE_ONLY  (1ULL << 35)
+ /**
+  * CUSE INIT request/reply flags
diff --git a/queue-6.1/regulator-of-fix-a-null-vs-is_err-check-in-of_regulator_bulk_get_all.patch b/queue-6.1/regulator-of-fix-a-null-vs-is_err-check-in-of_regulator_bulk_get_all.patch
new file mode 100644 (file)
index 0000000..e63355e
--- /dev/null
@@ -0,0 +1,31 @@
+From c957387c402a1a213102e38f92b800d7909a728d Mon Sep 17 00:00:00 2001
+From: Peng Wu <wupeng58@huawei.com>
+Date: Tue, 22 Nov 2022 08:22:42 +0000
+Subject: regulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all()
+
+From: Peng Wu <wupeng58@huawei.com>
+
+commit c957387c402a1a213102e38f92b800d7909a728d upstream.
+
+The regulator_get() function never returns NULL. It returns error pointers.
+
+Fixes: 27b9ecc7a9ba ("regulator: Add of_regulator_bulk_get_all")
+Signed-off-by: Peng Wu <wupeng58@huawei.com>
+Link: https://lore.kernel.org/r/20221122082242.82937-1-wupeng58@huawei.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/regulator/of_regulator.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/regulator/of_regulator.c
++++ b/drivers/regulator/of_regulator.c
+@@ -767,7 +767,7 @@ restart:
+                       memcpy(name, prop->name, i);
+                       name[i] = '\0';
+                       tmp = regulator_get(dev, name);
+-                      if (!tmp) {
++                      if (IS_ERR(tmp)) {
+                               ret = -EINVAL;
+                               goto error;
+                       }
index 2604a537c359f9e1123cdfcfff8e828ee80dcd4d..fb1ec77db9872dfff8b34856d8cf0e55939780fe 100644 (file)
@@ -188,3 +188,5 @@ x86-mm-fix-pti-for-i386-some-more.patch
 btrfs-fix-race-between-direct-io-write-and-fsync-when-using-same-fd.patch
 bpf-silence-a-warning-in-btf_type_id_size.patch
 memcg-protect-concurrent-access-to-mem_cgroup_idr.patch
+regulator-of-fix-a-null-vs-is_err-check-in-of_regulator_bulk_get_all.patch
+fuse-add-feature-flag-for-expire-only.patch