From: Greg Kroah-Hartman Date: Wed, 5 Apr 2023 14:33:20 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v6.1.23~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6198924cfcfd9255d7cdf55f17a7d407724c752;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: smb3-fix-problem-with-null-cifs-super-block-with-previous-patch.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index 97972422c9b..a983765e916 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1,2 +1,3 @@ revert-treewide-replace-declare_tasklet-with-declare_tasklet_old.patch treewide-replace-declare_tasklet-with-declare_tasklet_old.patch +smb3-fix-problem-with-null-cifs-super-block-with-previous-patch.patch diff --git a/queue-5.4/smb3-fix-problem-with-null-cifs-super-block-with-previous-patch.patch b/queue-5.4/smb3-fix-problem-with-null-cifs-super-block-with-previous-patch.patch new file mode 100644 index 00000000000..1331837f7d1 --- /dev/null +++ b/queue-5.4/smb3-fix-problem-with-null-cifs-super-block-with-previous-patch.patch @@ -0,0 +1,43 @@ +From 87f93d82e0952da18af4d978e7d887b4c5326c0b Mon Sep 17 00:00:00 2001 +From: Steve French +Date: Tue, 4 Feb 2020 13:02:59 -0600 +Subject: smb3: fix problem with null cifs super block with previous patch + +From: Steve French + +commit 87f93d82e0952da18af4d978e7d887b4c5326c0b upstream. + +Add check for null cifs_sb to create_options helper + +Signed-off-by: Steve French +Reviewed-by: Amir Goldstein +Reviewed-by: Aurelien Aptel +Signed-off-by: Pratyush Yadav +Signed-off-by: Greg Kroah-Hartman +--- + fs/cifs/cifsproto.h | 2 +- + fs/cifs/smb2ops.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/cifs/cifsproto.h ++++ b/fs/cifs/cifsproto.h +@@ -602,7 +602,7 @@ static inline int get_dfs_path(const uns + + static inline int cifs_create_options(struct cifs_sb_info *cifs_sb, int options) + { +- if (backup_cred(cifs_sb)) ++ if (cifs_sb && (backup_cred(cifs_sb))) + return options | CREATE_OPEN_BACKUP_INTENT; + else + return options; +--- a/fs/cifs/smb2ops.c ++++ b/fs/cifs/smb2ops.c +@@ -2343,7 +2343,7 @@ smb2_queryfs(const unsigned int xid, str + FS_FULL_SIZE_INFORMATION, + SMB2_O_INFO_FILESYSTEM, + sizeof(struct smb2_fs_full_size_info), +- &rsp_iov, &buftype, NULL); ++ &rsp_iov, &buftype, cifs_sb); + if (rc) + goto qfs_exit; +