aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2024-05-23 09:35:14 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-06-24 22:24:56 -0700
commit47e39c79336760031f98215c014c9800f5ed6481 (patch)
tree20851bdb3feb8b90a03e4f9eaac4a4ad1f462e9a /include/linux
parentocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry() (diff)
downloadwireguard-linux-47e39c79336760031f98215c014c9800f5ed6481.tar.xz
wireguard-linux-47e39c79336760031f98215c014c9800f5ed6481.zip
fork: use this_cpu_try_cmpxchg() in try_release_thread_stack_to_cache()
Use this_cpu_try_cmpxchg() instead of this_cpu_cmpxchg (*ptr, old, new) == old in try_release_thread_stack_to_cache. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. [ubizjak@gmail.com: simplify the for loop a bit] Link: https://lkml.kernel.org/r/20240523214442.21102-1-ubizjak@gmail.com Link: https://lkml.kernel.org/r/20240523073530.8128-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions