summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorOleg Nesterov2016-08-02 23:03:44 +0200
committerLinus Torvalds2016-08-03 01:35:02 +0200
commit61e96496d3c949701a48b908f99f4ed891cd1101 (patch)
treebf282d3036968de0bfd834914d712b6875fff7e3 /kernel/module.c
parentinclude: mman: use bool instead of int for the return value of arch_validate_... (diff)
downloadkernel-qcow2-linux-61e96496d3c949701a48b908f99f4ed891cd1101.tar.gz
kernel-qcow2-linux-61e96496d3c949701a48b908f99f4ed891cd1101.tar.xz
kernel-qcow2-linux-61e96496d3c949701a48b908f99f4ed891cd1101.zip
task_work: use READ_ONCE/lockless_dereference, avoid pi_lock if !task_works
Change task_work_cancel() to use lockless_dereference(), this is what the code really wants but we didn't have this helper when it was written. Also add the fast-path task->task_works == NULL check, in the likely case this task has no pending works and we can avoid spin_lock(task->pi_lock). While at it, change other users of ACCESS_ONCE() to use READ_ONCE(). Link: http://lkml.kernel.org/r/20160610150042.GA13868@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Andrea Parri <parri.andrea@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/module.c')
0 files changed, 0 insertions, 0 deletions