Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b668b4ef authored by Deepak Kumar's avatar Deepak Kumar
Browse files

adreno_tz: Correct tz_buf pointer type to correct pointer arithmetic



Current tz_buf pointer type is causing the end address calcultion
of tz_buf to go wrong. "end_addr = tz_buf + PAGE_ALIGN(size)" is
resulting in an end address way beyond the allocated range because
tz_buf is of type unsigned int. This change changes the tz_buf
pointer type to u8 to fix this issue.

Change-Id: I16db09c565801b56c0c0ee8a8184f6e276512fa3
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 98055d18
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ static int tz_init_ca(struct devfreq_msm_adreno_tz_data *priv)
{
	unsigned int tz_ca_data[2];
	struct scm_desc desc = {0};
	unsigned int *tz_buf;
	u8 *tz_buf;
	int ret;

	/* Set data for TZ */
@@ -281,7 +281,7 @@ static int tz_init(struct devfreq_msm_adreno_tz_data *priv,
			scm_is_call_available(SCM_SVC_DCVS, TZ_UPDATE_ID_64) &&
			scm_is_call_available(SCM_SVC_DCVS, TZ_RESET_ID_64)) {
		struct scm_desc desc = {0};
		unsigned int *tz_buf;
		u8 *tz_buf;

		if (!is_scm_armv8()) {
			ret = scm_call(SCM_SVC_DCVS, TZ_INIT_ID_64,