diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index db5b56064687..b98bed3d8182 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -2202,15 +2202,13 @@ static void perf_event_for_each(struct perf_event *event, | |||
2202 | static int perf_event_period(struct perf_event *event, u64 __user *arg) | 2202 | static int perf_event_period(struct perf_event *event, u64 __user *arg) |
2203 | { | 2203 | { |
2204 | struct perf_event_context *ctx = event->ctx; | 2204 | struct perf_event_context *ctx = event->ctx; |
2205 | unsigned long size; | ||
2206 | int ret = 0; | 2205 | int ret = 0; |
2207 | u64 value; | 2206 | u64 value; |
2208 | 2207 | ||
2209 | if (!event->attr.sample_period) | 2208 | if (!event->attr.sample_period) |
2210 | return -EINVAL; | 2209 | return -EINVAL; |
2211 | 2210 | ||
2212 | size = copy_from_user(&value, arg, sizeof(value)); | 2211 | if (copy_from_user(&value, arg, sizeof(value))) |
2213 | if (size != sizeof(value)) | ||
2214 | return -EFAULT; | 2212 | return -EFAULT; |
2215 | 2213 | ||
2216 | if (!value) | 2214 | if (!value) |