Unverified Commit 651dfbec authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15231 cifs: Prevent NULL pointer dereference caused by cifs_sb->rsize is 0

parents 55990887 799fe5b5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4259,6 +4259,11 @@ cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)

	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