diff options
Diffstat (limited to 'kernel/events/core.c')
| -rw-r--r-- | kernel/events/core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 2d5fe26551f8..67612ce359ad 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
| @@ -7587,6 +7587,10 @@ static void perf_event_switch(struct task_struct *task, | |||
| 7587 | }, | 7587 | }, |
| 7588 | }; | 7588 | }; |
| 7589 | 7589 | ||
| 7590 | if (!sched_in && task->state == TASK_RUNNING) | ||
| 7591 | switch_event.event_id.header.misc |= | ||
| 7592 | PERF_RECORD_MISC_SWITCH_OUT_PREEMPT; | ||
| 7593 | |||
| 7590 | perf_iterate_sb(perf_event_switch_output, | 7594 | perf_iterate_sb(perf_event_switch_output, |
| 7591 | &switch_event, | 7595 | &switch_event, |
| 7592 | NULL); | 7596 | NULL); |
| @@ -10205,9 +10209,9 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr, | |||
| 10205 | * __u16 sample size limit. | 10209 | * __u16 sample size limit. |
| 10206 | */ | 10210 | */ |
| 10207 | if (attr->sample_stack_user >= USHRT_MAX) | 10211 | if (attr->sample_stack_user >= USHRT_MAX) |
| 10208 | ret = -EINVAL; | 10212 | return -EINVAL; |
| 10209 | else if (!IS_ALIGNED(attr->sample_stack_user, sizeof(u64))) | 10213 | else if (!IS_ALIGNED(attr->sample_stack_user, sizeof(u64))) |
| 10210 | ret = -EINVAL; | 10214 | return -EINVAL; |
| 10211 | } | 10215 | } |
| 10212 | 10216 | ||
| 10213 | if (!attr->sample_max_stack) | 10217 | if (!attr->sample_max_stack) |
