summaryrefslogtreecommitdiffstats
path: root/lib/crc32.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2014-02-13 17:29:18 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-13 17:57:07 -0500
commite099e86c9e24fe9aff36773600543eb31d8954d1 (patch)
tree723936589e12e2bdcbf6aa8b702122b7488cec5e /lib/crc32.c
parenta83045292daf9f07d0b103e5715ef527123d2fcc (diff)
downloadlinux-e099e86c9e24fe9aff36773600543eb31d8954d1.tar.bz2
tipc: add node_lock protection to link lookup function
In an earlier commit, ("tipc: remove links list from bearer struct") we described three issues that need to be pre-emptively resolved before we can remove tipc_net_lock. Here we resolve issue a) described in that commit: "a) In access method #2, we access the link before taking the protecting node_lock. This will not work once net_lock is gone, so we will have to change the access order. We will deal with this in a later commit in this series." Here, we change that access order, by ensuring that the function link_find_link() returns only a safe reference for finding the link, i.e., a node pointer and an index into its 'links' array, not the link pointer itself. We also change all callers of this function to first take the node lock before they can check if there still is a valid link pointer at the returned index. Since the function now returns a node pointer rather than a link pointer, we rename it to the more appropriate 'tipc_link_find_owner(). Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/crc32.c')
0 files changed, 0 insertions, 0 deletions