aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2012-05-11 10:59:08 +1000
committerAl Viro <[email protected]>2012-05-23 22:11:23 -0400
commit413cd3d9abeaef590e5ce00564f7a443165db238 (patch)
treefc7d254053793a95d1470f7c9eafb782d8cf91d6 /tools/perf/util/scripting-engines/trace-event-python.c
parent4d1d61a6b203d957777d73fcebf19d90b038b5b2 (diff)
keys: change keyctl_session_to_parent() to use task_work_add()
Change keyctl_session_to_parent() to use task_work_add() and move key_replace_session_keyring() logic into task_work->func(). Note that we do task_work_cancel() before task_work_add() to ensure that only one work can be pending at any time. This is important, we must not allow user-space to abuse the parent's ->task_works list. The callback, replace_session_keyring(), checks PF_EXITING. I guess this is not really needed but looks better. As a side effect, this fixes the (unlikely) race. The callers of key_replace_session_keyring() and keyctl_session_to_parent() lack the necessary barriers, the parent can miss the request. Now we can remove task_struct->replacement_session_keyring and related code. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: David Howells <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Richard Kuo <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Chris Zankel <[email protected]> Cc: David Smith <[email protected]> Cc: "Frank Ch. Eigler" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Larry Woodman <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions