Unverified Commit 68e31dbd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 38e5ed39 df36ec36
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1345,12 +1345,15 @@ static int user_exp_rcv_setup(struct hfi1_filedata *fd, unsigned long arg,
		addr = arg + offsetof(struct hfi1_tid_info, tidcnt);
		if (copy_to_user((void __user *)addr, &tinfo.tidcnt,
				 sizeof(tinfo.tidcnt)))
			return -EFAULT;
			ret = -EFAULT;

		addr = arg + offsetof(struct hfi1_tid_info, length);
		if (copy_to_user((void __user *)addr, &tinfo.length,
		if (!ret && copy_to_user((void __user *)addr, &tinfo.length,
				 sizeof(tinfo.length)))
			ret = -EFAULT;

		if (ret)
			hfi1_user_exp_rcv_invalid(fd, &tinfo);
	}

	return ret;