
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC1OPD CVE: NA -------------------------------- This reverts commit 799fe5b5c36147d8f7eaadbe982efffcb85eddfc. There is already a community solution, so choose to revert this temporary solution and adopt the community solution. Fixes: 799fe5b5c361 ("cifs: Prevent NULL pointer dereference caused by cifs_sb->rsize is 0") Signed-off-by: Wang Zhaolong <wangzhaolong1@huawei.com> --- fs/cifs/connect.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index b6db874d19d5..fd4ec5bd35f6 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -4242,15 +4242,10 @@ cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) if (!tcon->pipe && server->ops->qfs_tcon) server->ops->qfs_tcon(xid, tcon); cifs_sb->wsize = server->ops->negotiate_wsize(tcon, volume_info); cifs_sb->rsize = server->ops->negotiate_rsize(tcon, volume_info); - if (cifs_sb->rsize == 0) { - cifs_dbg(VFS, "Negotiated rsize is 0, mount failed\n"); - rc = -EINVAL; - goto mount_fail_check; - } remote_path_check: #ifdef CONFIG_CIFS_DFS_UPCALL /* * Perform an unconditional check for whether there are DFS -- 2.39.2