summaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2017-08-24 17:31:24 +0300
committerDavid S. Miller <davem@davemloft.net>2017-08-25 07:54:34 +0300
commit991ca84daa001193066554fa49f3a934746317d6 (patch)
treef245d40d37905357178c4251a136f8ed7f9bb2d4 /net/tipc
parent60d1d93664a0bb3d5af722ed38c57ee165a45bf7 (diff)
downloadlinux-991ca84daa001193066554fa49f3a934746317d6.tar.xz
tipc: context imbalance at node read unlock
If we fail to find a valid bearer in tipc_node_get_linkname(), node_read_unlock() is called without holding the node read lock. This commit fixes this error. Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index b113a52f8914..7dd22330a6b4 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1126,8 +1126,8 @@ int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 addr,
strncpy(linkname, tipc_link_name(link), len);
err = 0;
}
-exit:
tipc_node_read_unlock(node);
+exit:
tipc_node_put(node);
return err;
}