Messages in this thread | | | Subject | Re: [PATCH,RFC] perf: panic due to inclied cpu context task_ctx value | From | Peter Zijlstra <> | Date | Mon, 28 Mar 2011 17:49:28 +0200 |
| |
On Mon, 2011-03-28 at 16:57 +0200, Peter Zijlstra wrote: > > > > Wait... Yes, we have to clear ctx->is_active, otherwise we break, say, > > perf_install_in_context(). > > > > But if we clear ->is_active we break perf_event_enable(). Suppose we > > are doing ioctl(PERF_EVENT_IOC_DISABLE) + ioctl(PERF_EVENT_IOC_ENABLE). > > PERF_EVENT_IOC_DISABLE can sched_out the last event, but _IOC_ENABLE > > treats ctx->is_active == F as "it is not running". > > Right, same for the tick, if say we can only schedule 1 event at a time > and we close the 1 event that is active, the tick will not rotate a new > event in.
Another fun race, suppose we do properly remove task_ctx and is_active, but then the task gets scheduled back in before free_event() gets around to disabling the jump_label..
| |