
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC1OPD CVE:NA -------------------------------- This reverts commit 3319eda60a52c7975f57bc080d7e75e71e8f2f0b. There is already a community solution, so choose to revert this temporary solution and adopt the community solution. Fixes: 3319eda60a52 ("cifs: Prevent NULL pointer dereference caused by cifs_sb->rsize is 0") Signed-off-by: Wang Zhaolong <wangzhaolong1@huawei.com> --- fs/smb/client/connect.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index 8f381bd97142..910ff0ab979f 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -3549,15 +3549,10 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx) } } if ((cifs_sb->ctx->rsize == 0) || (cifs_sb->ctx->rsize > server->ops->negotiate_rsize(tcon, ctx))) cifs_sb->ctx->rsize = server->ops->negotiate_rsize(tcon, ctx); - if (cifs_sb->ctx->rsize == 0) { - cifs_dbg(VFS, "Negotiated rsize is 0, get connect failed\n"); - rc = -EINVAL; - goto out; - } /* * The cookie is initialized from volume info returned above. * Inside cifs_fscache_get_super_cookie it checks * that we do not get super cookie twice. -- 2.34.3