summaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.h
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2017-01-24 13:00:43 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-24 16:14:57 -0500
commit93f955aad4bacee5acebad141d1a03cd51f27b4e (patch)
tree3be1033d66d191d4e06ae66ffd3d2b2808e045eb /net/tipc/subscr.h
parent294628c1fe660b5c4ba4127df05ff2aa8c09a08a (diff)
downloadlinux-stable-93f955aad4bacee5acebad141d1a03cd51f27b4e.tar.gz
linux-stable-93f955aad4bacee5acebad141d1a03cd51f27b4e.tar.bz2
linux-stable-93f955aad4bacee5acebad141d1a03cd51f27b4e.zip
tipc: fix nametbl_lock soft lockup at node/link events
We trigger a soft lockup as we grab nametbl_lock twice if the node has a pending node up/down or link up/down event while: - we process an incoming named message in tipc_named_rcv() and perform an tipc_update_nametbl(). - we have pending backlog items in the name distributor queue during a nametable update using tipc_nametbl_publish() or tipc_nametbl_withdraw(). The following are the call chain associated: tipc_named_rcv() Grabs nametbl_lock tipc_update_nametbl() (publish/withdraw) tipc_node_subscribe()/unsubscribe() tipc_node_write_unlock() << lockup occurs if an outstanding node/link event exits, as we grabs nametbl_lock again >> tipc_nametbl_withdraw() Grab nametbl_lock tipc_named_process_backlog() tipc_update_nametbl() << rest as above >> The function tipc_node_write_unlock(), in addition to releasing the lock processes the outstanding node/link up/down events. To do this, we need to grab the nametbl_lock again leading to the lockup. In this commit we fix the soft lockup by introducing a fast variant of node_unlock(), where we just release the lock. We adapt the node_subscribe()/node_unsubscribe() to use the fast variants. Reported-and-Tested-by: John Thompson <thompa.atl@gmail.com> Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/subscr.h')
0 files changed, 0 insertions, 0 deletions