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

Commit 2a3c9373 authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Pass an actual pointer to a snapshot callback



Pass an actual pointer to the snapshot_os callback from
kgsl_device_snapshot in lieu of playing a dangerous dereferencing
trick.

Change-Id: Ic0dedbaddbae90f18953582d113170d316a9b7f4
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 6baf1216
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ static int snapshot_os(struct kgsl_device *device,
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	struct task_struct *task;
	pid_t pid;
	int hang = (int) priv;
	int hang = *((int *) priv);
	int ctxtcount = 0;
	int size = sizeof(*header);
	phys_addr_t temp_ptbase;
@@ -671,7 +671,7 @@ int kgsl_device_snapshot(struct kgsl_device *device, int hang)

	/* Build the Linux specific header */
	snapshot = kgsl_snapshot_add_section(device, KGSL_SNAPSHOT_SECTION_OS,
		snapshot, &remain, snapshot_os, (void *) hang);
		snapshot, &remain, snapshot_os, &hang);

	/* Get the device specific sections */
	if (device->ftbl->snapshot)