Messages in this thread | | | Date | Mon, 20 Aug 2012 16:55:50 +0200 | From | Oleg Nesterov <> | Subject | Re: lockdep trace from posix timers |
| |
On 08/20, Peter Zijlstra wrote: > > On Fri, 2012-08-17 at 17:14 +0200, Oleg Nesterov wrote: > > I still think that task_work_add() should synhronize with exit_task_work() > > itself and fail if necessary. But I wasn't able to convince Al ;) > > I'm not at all sure how that relates to needing task_lock() in the > keyctl stuff.
To serialize with exit_mm() which clears ->mm.
We shouldn't do task_work_add(task) if the exiting task has already passed exit_task_work(). There is no way to do this after ed3e694d7 (and I think this is wrong), so keyctl relies on the fact that exit_task_work() is called after exit_mm().
> Also, can't task_work use llist stuff? That would also avoid using > ->pi_lock.
Not sure.... task_work_add/run can use cmpxchg, but _cancel can't.
Oleg.
| |