From: Ying Xue Date: Mon, 21 Apr 2014 02:55:51 +0000 (+0800) Subject: tipc: use bc_lock to protect node map in bearer structure X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~348^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28dd94187afd660a350d01d6bad4a915a6d570b8;p=pandora-kernel.git tipc: use bc_lock to protect node map in bearer structure The node map variable - 'nodes' in bearer structure is only used by bclink. When bclink accesses it, bc_lock is held. But when change it, for instance, in tipc_bearer_add_dest() or tipc_bearer_remove_dest() the bc_lock is not taken at all. To avoid any inconsistent data, we should always grab bc_lock while accessing node map variable. Signed-off-by: Ying Xue Reviewed-by: Jon Maloy Reviewed-by: Erik Hugne Tested-by: Erik Hugne Signed-off-by: David S. Miller --- Reading git-diff-tree failed