aboutsummaryrefslogtreecommitdiff
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-03-27 12:54:36 +0800
committerDavid S. Miller <davem@davemloft.net>2014-03-27 13:08:37 -0400
commit46651c59c483f14fd35cf7df2104feac0e54e258 (patch)
tree06945336cf5bab75a27df13f7a6408d5d1e88672 /mm/slab_common.c
parent987b58be376b8d087a9bb677f50592efc6ccb7c5 (diff)
tipc: rename node create lock to protect node list and hlist
When a node is created, tipc_net_lock read lock is first held and then node_create_lock is grabbed in order to prevent the same node from being created and inserted into both node list and hlist twice. But when we query node from the two node lists, we only hold tipc_net_lock read lock without grabbing node_create_lock. Obviously this locking policy is unable to guarantee that the two node lists are always synchronized especially when the operation of changing and accessing them occurs in different contexts like currently doing. Therefore, rename node_create_lock to node_list_lock to protect the two node lists, that is, whenever node is inserted into them or node is queried from them, the node_list_lock should be always held. As a result, tipc_net_lock read lock becomes redundant and then can be removed from the node query functions. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/slab_common.c')
0 files changed, 0 insertions, 0 deletions