diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/events/core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index f9c1ed002dbc..d640a8b4dcbc 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
| @@ -1524,6 +1524,11 @@ retry: | |||
| 1524 | */ | 1524 | */ |
| 1525 | if (ctx->is_active) { | 1525 | if (ctx->is_active) { |
| 1526 | raw_spin_unlock_irq(&ctx->lock); | 1526 | raw_spin_unlock_irq(&ctx->lock); |
| 1527 | /* | ||
| 1528 | * Reload the task pointer, it might have been changed by | ||
| 1529 | * a concurrent perf_event_context_sched_out(). | ||
| 1530 | */ | ||
| 1531 | task = ctx->task; | ||
| 1527 | goto retry; | 1532 | goto retry; |
| 1528 | } | 1533 | } |
| 1529 | 1534 | ||
| @@ -1967,6 +1972,11 @@ retry: | |||
| 1967 | */ | 1972 | */ |
| 1968 | if (ctx->is_active) { | 1973 | if (ctx->is_active) { |
| 1969 | raw_spin_unlock_irq(&ctx->lock); | 1974 | raw_spin_unlock_irq(&ctx->lock); |
| 1975 | /* | ||
| 1976 | * Reload the task pointer, it might have been changed by | ||
| 1977 | * a concurrent perf_event_context_sched_out(). | ||
| 1978 | */ | ||
| 1979 | task = ctx->task; | ||
| 1970 | goto retry; | 1980 | goto retry; |
| 1971 | } | 1981 | } |
| 1972 | 1982 | ||
