summaryrefslogtreecommitdiff
path: root/lib/test_string.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-12-10 11:49:55 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-09 17:38:34 +0100
commit2ce6d5aeafba9066eec0f93e85f463549f362dae (patch)
tree2c50d328ef3d900ed93974715fdceb3b640c2e5a /lib/test_string.c
parentb66ecc4f0b36597ee993b93f3a3a161f8309bab4 (diff)
tipc: use lock_sock() in tipc_sk_reinit()
[ Upstream commit 15ef70e286176165d28b0b8a969b422561a68dfc ] lock_sock() must be used in process context to be race-free with other lock_sock() callers, for example, tipc_release(). Otherwise using the spinlock directly can't serialize a parallel tipc_release(). As it is blocking, we have to hold the sock refcnt before rhashtable_walk_stop() and release it after rhashtable_walk_start(). Fixes: 07f6c4bc048a ("tipc: convert tipc reference table to use generic rhashtable") Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: Ying Xue <ying.xue@windriver.com> Cc: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/test_string.c')
0 files changed, 0 insertions, 0 deletions