Skip to content

Commit 5de0434

Browse files
committed
btrfs: fix 64bit compat send ioctl arguments not initializing version member
When the send protocol versioning was added in 5.16 e77fbf9 ("btrfs: send: prepare for v2 protocol"), the 32/64bit compat code was not updated (added by 2351f43 ("btrfs: fix send ioctl on 32bit with 64bit kernel")), missing the version struct member. The compat code is probably rarely used, nobody reported any bugs. Found by tool https://github.com/jirislaby/clang-struct . Fixes: e77fbf9 ("btrfs: send: prepare for v2 protocol") CC: [email protected] # 6.1+ Reviewed-by: Filipe Manana <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 7d410d5 commit 5de0434

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/ioctl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4358,6 +4358,7 @@ static int _btrfs_ioctl_send(struct inode *inode, void __user *argp, bool compat
43584358
arg->clone_sources = compat_ptr(args32.clone_sources);
43594359
arg->parent_root = args32.parent_root;
43604360
arg->flags = args32.flags;
4361+
arg->version = args32.version;
43614362
memcpy(arg->reserved, args32.reserved,
43624363
sizeof(args32.reserved));
43634364
#else

0 commit comments

Comments
 (0)