lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Jul 2016 17:50:13 +0800
From:	Ying Xue <ying.xue0@...il.com>
To:	Wei Yongjun <weiyj.lk@...il.com>,
	Jon Maloy <jon.maloy@...csson.com>,
	Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...csson.com>,
	"David S. Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH -next] tipc: fix imbalance read_unlock_bh in
 __tipc_nl_add_monitor()

On 07/28/2016 10:07 AM, Wei Yongjun wrote:
> 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@...il.com>

Acked-by: Ying Xue <ying.xue@...driver.com>

> ---
>  net/tipc/monitor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c
> index be70a57..b62caa1 100644
> --- a/net/tipc/monitor.c
> +++ b/net/tipc/monitor.c
> @@ -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;
>  }
> 
> 

Powered by blists - more mailing lists