Message ID | 20200124093143.005390193@linuxfoundation.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | None | expand |
diff --git a/kernel/events/core.c b/kernel/events/core.c index 751888cbed5c0..16af86ab24c42 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5012,6 +5012,9 @@ static int perf_event_period(struct perf_event *event, u64 __user *arg) if (perf_event_check_period(event, value)) return -EINVAL; + if (!event->attr.freq && (value & (1ULL << 63))) + return -EINVAL; + event_function_call(event, __perf_event_period, &value); return 0;