mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
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: cf6f7e1d51
('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>
This commit is contained in:
parent
9d594b3958
commit
6b65bc2972
1 changed files with 1 additions and 1 deletions
|
@ -794,10 +794,10 @@ int __tipc_nl_add_monitor(struct net *net, struct tipc_nl_msg *msg,
|
|||
return 0;
|
||||
|
||||
attr_msg_full:
|
||||
read_unlock_bh(&mon->lock);
|
||||
nla_nest_cancel(msg->skb, attrs);
|
||||
msg_full:
|
||||
genlmsg_cancel(msg->skb, hdr);
|
||||
read_unlock_bh(&mon->lock);
|
||||
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue