On Mon, Apr 09, 2018 at 12:40:10PM +0200, Oleg Nesterov wrote: > But I still think that we should (try to) remove put_task_struct() from > put_ctx(). > > Quite possibly I missed something, but I think it only adds some confusion. > Once > again, even if ctx can't go away you can't use ctx->task without > TASK_TOMBSTONE > check, exactly because this task can exit. So why perf_event_context should > add > another reference?
Ah, I see what you mean. Yes that might be possible.