summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* task_work: Revert "hold task_lock around checks in keyctl"f18_taskworkOleg Nesterov2012-10-291-2/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit d35abdb28824cf74f0a106a0f9c6f3ff700a35bf. task_lock() was added to ensure exit_mm() and thus exit_task_work() is not possible before task_work_add(). This is wrong, task_lock() must not be nested with write_lock(tasklist). And this is no longer needed, task_work_add() now fails if it is called after exit_task_work(). Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/20120826191214.GA4231@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* task_work: task_work_add() should not succeed after exit_task_work()Oleg Nesterov2012-10-292-8/+17
| | | | | | | | | | | | | | | | | | | | | | ed3e694d "move exit_task_work() past exit_files() et.al" destroyed the add/exit synchronization we had, the caller itself should ensure task_work_add() can't race with the exiting task. However, this is not convenient/simple, and the only user which tries to do this is buggy (see the next patch). Unless the task is current, there is simply no way to do this in general. Change exit_task_work()->task_work_run() to use the dummy "work_exited" entry to let task_work_add() know it should fail. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20120826191211.GA4228@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* task_work: Make task_work_add() locklessOleg Nesterov2012-10-291-47/+48
| | | | | | | | | | | | | | | | | | | | Change task_work's to use llist-like code to avoid pi_lock in task_work_add(), this makes it useable under rq->lock. task_work_cancel() and task_work_run() still use pi_lock to synchronize with each other. (This is in preparation for a deadlock fix.) Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20120826191209.GA4221@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* fedora kernel: 1c1fad82422e58b20bf06bb371c38154b4b965dbv3.6.3-4f18Anton Arapov2012-10-29808-9892/+19678
| | | | Signed-off-by: Anton Arapov <anton@redhat.com>
* fedora kernel: 5006e294cad99968b73c89679431ab73ec6bd0bav3.6.0-0.rc5.git3.1Anton Arapov2012-09-17263-1175/+2607
| | | | Signed-off-by: Anton Arapov <anton@redhat.com>
* fedora kernel: 235ab5f360023f79ce24102cee8a9678a5a5e987Anton Arapov2012-09-1739713-0/+15928063
| | | | Signed-off-by: Anton Arapov <anton@redhat.com>
* initAnton Arapov2012-04-161-0/+0
Signed-off-by: Anton Arapov <anton@redhat.com>