Commit 000dcaa5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'coresight-fixes-v6.4' of...

Merge tag 'coresight-fixes-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux

 into char-misc-linus

Suzuki writes:

coresight: Fixes for v6.4

Couple of fixes for coresight self-hosted tracing subsystem for v6.4.
These include :
  - Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
  - Fix memory leak with failing to release the path if trace-id allocation fails

Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>

* tag 'coresight-fixes-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
  coresight: perf: Release Coresight path when alloc trace id failed
  coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
parents ac9a7868 04ac7f98
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -402,6 +402,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages,
		trace_id = coresight_trace_id_get_cpu_id(cpu);
		if (!IS_VALID_CS_TRACE_ID(trace_id)) {
			cpumask_clear_cpu(cpu, mask);
			coresight_release_path(path);
			continue;
		}

+1 −1
Original line number Diff line number Diff line
@@ -942,7 +942,7 @@ tmc_etr_buf_insert_barrier_packet(struct etr_buf *etr_buf, u64 offset)

	len = tmc_etr_buf_get_data(etr_buf, offset,
				   CORESIGHT_BARRIER_PKT_SIZE, &bufp);
	if (WARN_ON(len < CORESIGHT_BARRIER_PKT_SIZE))
	if (WARN_ON(len < 0 || len < CORESIGHT_BARRIER_PKT_SIZE))
		return -EINVAL;
	coresight_insert_barrier_packet(bufp);
	return offset + CORESIGHT_BARRIER_PKT_SIZE;