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

Commit 85a93b95 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: gsi: fix memory corruption from debugfs



Fix to GSI reset stats logic to clear the correct stats per channel

Change-Id: I94ae8c769ec2868a291e75a2f47c85bd8a449937
CRs-Fixed: 1046484
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 6f69554f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -653,10 +653,10 @@ static ssize_t gsi_rst_stats(struct file *file,
	} else if (ch_id < 0 || ch_id >= GSI_MAX_CHAN ||
		   !gsi_ctx->chan[ch_id].allocated) {
		goto error;
	}

	} else {
		min = ch_id;
		max = ch_id + 1;
	}

	for (ch_id = min; ch_id < max; ch_id++)
		memset(&gsi_ctx->chan[ch_id].stats, 0,