diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2017-08-24 10:31:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-25 00:54:34 -0400 |
commit | 991ca84daa001193066554fa49f3a934746317d6 (patch) | |
tree | f245d40d37905357178c4251a136f8ed7f9bb2d4 /net/tipc | |
parent | 60d1d93664a0bb3d5af722ed38c57ee165a45bf7 (diff) |
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.c | 2 |
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, | |||
1126 | strncpy(linkname, tipc_link_name(link), len); | 1126 | strncpy(linkname, tipc_link_name(link), len); |
1127 | err = 0; | 1127 | err = 0; |
1128 | } | 1128 | } |
1129 | exit: | ||
1130 | tipc_node_read_unlock(node); | 1129 | tipc_node_read_unlock(node); |
1130 | exit: | ||
1131 | tipc_node_put(node); | 1131 | tipc_node_put(node); |
1132 | return err; | 1132 | return err; |
1133 | } | 1133 | } |