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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0f1b869e-080a-2785-e4c1-01f308f246bb@linux.alibaba.com>
Date:   Tue, 25 Feb 2020 08:53:21 +0800
From:   Joseph Qi <joseph.qi@...ux.alibaba.com>
To:     Jules Irenge <jbi.octave@...il.com>, boqun.feng@...il.com
Cc:     joseph.qi@...ux.alibab.com, Mark Fasheh <mark@...heh.com>,
        Joel Becker <jlbec@...lplan.org>,
        "moderated list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2)" 
        <ocfs2-devel@....oracle.com>,
        open list <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] ocfs2: Add missing annotations for
 ocfs2_refcount_cache_lock() and ocfs2_refcount_cache_unlock()



On 2020/2/25 04:41, Jules Irenge wrote:
> Sparse reports warnings at ocfs2_refcount_cache_lock()
> 	and ocfs2_refcount_cache_unlock()
> 
> warning: context imbalance in ocfs2_refcount_cache_lock()
> 	- wrong count at exit
> warning: context imbalance in ocfs2_refcount_cache_unlock()
> 	- unexpected unlock
> 
> The root cause is the missing annotation at ocfs2_refcount_cache_lock()
> 	and at ocfs2_refcount_cache_unlock()
> 
> Add the missing __acquires(&rf->rf_lock) annotation
> 	to ocfs2_refcount_cache_lock()
> Add the missing __releases(&rf->rf_lock) annotation
> 	to ocfs2_refcount_cache_unlock()
> 
> Signed-off-by: Jules Irenge <jbi.octave@...il.com>

Acked-by: Joseph Qi <joseph.qi@...ux.alibaba.com>
> ---
>  fs/ocfs2/refcounttree.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
> index ee43e51188be..da99c80f49da 100644
> --- a/fs/ocfs2/refcounttree.c
> +++ b/fs/ocfs2/refcounttree.c
> @@ -154,6 +154,7 @@ ocfs2_refcount_cache_get_super(struct ocfs2_caching_info *ci)
>  }
>  
>  static void ocfs2_refcount_cache_lock(struct ocfs2_caching_info *ci)
> +	__acquires(&rf->rf_lock)
>  {
>  	struct ocfs2_refcount_tree *rf = cache_info_to_refcount(ci);
>  
> @@ -161,6 +162,7 @@ static void ocfs2_refcount_cache_lock(struct ocfs2_caching_info *ci)
>  }
>  
>  static void ocfs2_refcount_cache_unlock(struct ocfs2_caching_info *ci)
> +	__releases(&rf->rf_lock)
>  {
>  	struct ocfs2_refcount_tree *rf = cache_info_to_refcount(ci);
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ