tipc: fix imbalance read_unlock_bh in __tipc_nl_add_monitor()
authorWei Yongjun <weiyj.lk@gmail.com>
Thu, 28 Jul 2016 02:07:49 +0000 (02:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 03:38:22 +0000 (20:38 -0700)
commit6b65bc29721dee21e963cde3a83369bd09ba5358
treec82fcc4dbbc212910b1a833abb7a1f69c472afd7
parent9d594b395808accfaafa9b572e2716e037274c2a
tipc: fix imbalance read_unlock_bh in __tipc_nl_add_monitor()

In the error handling case of nla_nest_start() failed read_unlock_bh()
is called  to unlock a lock that had not been taken yet. sparse warns
about the context imbalance as the following:

net/tipc/monitor.c:799:23: warning:
 context imbalance in '__tipc_nl_add_monitor' - different lock contexts for basic block

Fixes: cf6f7e1d5109 ('tipc: dump monitor attributes')
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/monitor.c