]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2022 12:29:28 +0000 (13:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2022 12:29:28 +0000 (13:29 +0100)
added patches:
btrfs-fix-type-of-parameter-generation-in-btrfs_get_dentry.patch

queue-5.4/btrfs-fix-type-of-parameter-generation-in-btrfs_get_dentry.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/btrfs-fix-type-of-parameter-generation-in-btrfs_get_dentry.patch b/queue-5.4/btrfs-fix-type-of-parameter-generation-in-btrfs_get_dentry.patch
new file mode 100644 (file)
index 0000000..2643cfb
--- /dev/null
@@ -0,0 +1,44 @@
+From 2398091f9c2c8e0040f4f9928666787a3e8108a7 Mon Sep 17 00:00:00 2001
+From: David Sterba <dsterba@suse.com>
+Date: Tue, 18 Oct 2022 16:05:52 +0200
+Subject: btrfs: fix type of parameter generation in btrfs_get_dentry
+
+From: David Sterba <dsterba@suse.com>
+
+commit 2398091f9c2c8e0040f4f9928666787a3e8108a7 upstream.
+
+The type of parameter generation has been u32 since the beginning,
+however all callers pass a u64 generation, so unify the types to prevent
+potential loss.
+
+CC: stable@vger.kernel.org # 4.9+
+Reviewed-by: Josef Bacik <josef@toxicpanda.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/export.c |    2 +-
+ fs/btrfs/export.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/btrfs/export.c
++++ b/fs/btrfs/export.c
+@@ -58,7 +58,7 @@ static int btrfs_encode_fh(struct inode
+ }
+ struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
+-                              u64 root_objectid, u32 generation,
++                              u64 root_objectid, u64 generation,
+                               int check_generation)
+ {
+       struct btrfs_fs_info *fs_info = btrfs_sb(sb);
+--- a/fs/btrfs/export.h
++++ b/fs/btrfs/export.h
+@@ -19,7 +19,7 @@ struct btrfs_fid {
+ } __attribute__ ((packed));
+ struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
+-                              u64 root_objectid, u32 generation,
++                              u64 root_objectid, u64 generation,
+                               int check_generation);
+ struct dentry *btrfs_get_parent(struct dentry *child);
index e2c0191be6682c3a75a39ce795640aaa9d3fe032..f029ee0b5943e5b4701b14c784771f5d3bf1a4ec 100644 (file)
@@ -45,3 +45,4 @@ block-bfq-protect-bfqd-queued-by-bfqd-lock.patch
 tcp-udp-fix-memory-leak-in-ipv6_renew_options.patch
 memcg-enable-accounting-of-ipc-resources.patch
 binder-fix-uaf-of-alloc-vma-in-race-with-munmap.patch
+btrfs-fix-type-of-parameter-generation-in-btrfs_get_dentry.patch