]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/hwtracing/coresight/coresight-etm-perf.c
coresight: fix kernel panic caused by invalid CPU
[mirror_ubuntu-zesty-kernel.git] / drivers / hwtracing / coresight / coresight-etm-perf.c
index 17741969026e0e23391763d8ce1907729c1184e1..26cfac3e6de7be45d6de4e7d2ffa1e8c52a3f39d 100644 (file)
@@ -242,6 +242,7 @@ static void *etm_setup_aux(int event_cpu, void **pages,
        if (!sink_ops(sink)->alloc_buffer)
                goto err;
 
+       cpu = cpumask_first(mask);
        /* Get the AUX specific data from the sink buffer */
        event_data->snk_config =
                        sink_ops(sink)->alloc_buffer(sink, cpu, pages,