Patch "hwtracing: hisi_ptt: Don't try to attach a task" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    hwtracing: hisi_ptt: Don't try to attach a task

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwtracing-hisi_ptt-don-t-try-to-attach-a-task.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2af0856742825c581bb6dcb02a3f6dc89ae0414f
Author: Yicong Yang <yangyicong@xxxxxxxxxxxxx>
Date:   Tue Oct 10 16:47:30 2023 +0800

    hwtracing: hisi_ptt: Don't try to attach a task
    
    [ Upstream commit aff787f64ad7cbb54614b51b82c682fe06411ef3 ]
    
    PTT is an uncore PMU and shouldn't be attached to any task. Block
    the usage in pmu::event_init().
    
    Signed-off-by: Yicong Yang <yangyicong@xxxxxxxxxxxxx>
    Acked-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
    Link: https://lore.kernel.org/r/20231010084731.30450-5-yangyicong@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
index 11f26ef709c9..8d8fa8e8afe0 100644
--- a/drivers/hwtracing/ptt/hisi_ptt.c
+++ b/drivers/hwtracing/ptt/hisi_ptt.c
@@ -659,6 +659,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)
 		return -EOPNOTSUPP;
 	}
 
+	if (event->attach_state & PERF_ATTACH_TASK)
+		return -EOPNOTSUPP;
+
 	if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
 		return -ENOENT;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux