diff options
-rw-r--r-- | arch/x86/events/intel/pt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 04bb5fb5a8d7..5ec0100e3fc6 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c | |||
@@ -1081,7 +1081,7 @@ static int pt_event_addr_filters_validate(struct list_head *filters) | |||
1081 | 1081 | ||
1082 | list_for_each_entry(filter, filters, entry) { | 1082 | list_for_each_entry(filter, filters, entry) { |
1083 | /* PT doesn't support single address triggers */ | 1083 | /* PT doesn't support single address triggers */ |
1084 | if (!filter->range) | 1084 | if (!filter->range || !filter->size) |
1085 | return -EOPNOTSUPP; | 1085 | return -EOPNOTSUPP; |
1086 | 1086 | ||
1087 | if (!filter->inode && !kernel_ip(filter->offset)) | 1087 | if (!filter->inode && !kernel_ip(filter->offset)) |
@@ -1111,7 +1111,7 @@ static void pt_event_addr_filters_sync(struct perf_event *event) | |||
1111 | } else { | 1111 | } else { |
1112 | /* apply the offset */ | 1112 | /* apply the offset */ |
1113 | msr_a = filter->offset + offs[range]; | 1113 | msr_a = filter->offset + offs[range]; |
1114 | msr_b = filter->size + msr_a; | 1114 | msr_b = filter->size + msr_a - 1; |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | filters->filter[range].msr_a = msr_a; | 1117 | filters->filter[range].msr_a = msr_a; |