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

Commit 4197511b authored by Pankaj Gupta's avatar Pankaj Gupta
Browse files

msm: kgsl: Access map_count only if entry is successfully allocated



In kgsl_mem_entry_create, access map_count only if entry is allocated
successfully to avoid invalid access.

Change-Id: I57bce1aec2da6a27b6d13dbee96ed86a45c9660c
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
Signed-off-by: default avatarPankaj Gupta <gpankaj@codeaurora.org>
parent 1d16e8ba
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -265,8 +265,9 @@ kgsl_mem_entry_create(void)

		/* put this ref in the caller functions after init */
		kref_get(&entry->refcount);
	}
		atomic_set(&entry->map_count, 0);
	}

	return entry;
}
#ifdef CONFIG_DMA_SHARED_BUFFER