* [PATCH 01/30] btrfs: Add missing annotation for release_extent_buffer()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:27 ` Nikolay Borisov
2020-02-24 15:19 ` David Sterba
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 2 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Chris Mason, Josef Bacik, David Sterba,
open list:BTRFS FILE SYSTEM
Sparse reports a warning at release_extent_buffer()
warning: context imbalance in release_extent_buffer() - unexpected unlock
The root cause is the missing annotation at release_extent_buffer()
Add the missing __releases(&eb->refs_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
fs/btrfs/extent_io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c0f202741e09..8b6d6893e7a7 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5230,6 +5230,7 @@ static inline void btrfs_release_extent_buffer_rcu(struct rcu_head *head)
}
static int release_extent_buffer(struct extent_buffer *eb)
+ __releases(&eb->refs_lock)
{
lockdep_assert_held(&eb->refs_lock);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 01/30] btrfs: Add missing annotation for release_extent_buffer()
2020-02-23 23:16 ` [PATCH 01/30] btrfs: Add missing annotation for release_extent_buffer() Jules Irenge
@ 2020-02-23 23:27 ` Nikolay Borisov
2020-02-24 15:19 ` David Sterba
1 sibling, 0 replies; 125+ messages in thread
From: Nikolay Borisov @ 2020-02-23 23:27 UTC (permalink / raw)
To: Jules Irenge, boqun.feng
Cc: linux-kernel, Chris Mason, Josef Bacik, David Sterba,
open list:BTRFS FILE SYSTEM
On 24.02.20 г. 1:16 ч., Jules Irenge wrote:
> Sparse reports a warning at release_extent_buffer()
> warning: context imbalance in release_extent_buffer() - unexpected unlock
>
> The root cause is the missing annotation at release_extent_buffer()
> Add the missing __releases(&eb->refs_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 01/30] btrfs: Add missing annotation for release_extent_buffer()
2020-02-23 23:16 ` [PATCH 01/30] btrfs: Add missing annotation for release_extent_buffer() Jules Irenge
2020-02-23 23:27 ` Nikolay Borisov
@ 2020-02-24 15:19 ` David Sterba
1 sibling, 0 replies; 125+ messages in thread
From: David Sterba @ 2020-02-24 15:19 UTC (permalink / raw)
To: Jules Irenge
Cc: boqun.feng, linux-kernel, Chris Mason, Josef Bacik, David Sterba,
open list:BTRFS FILE SYSTEM
On Sun, Feb 23, 2020 at 11:16:42PM +0000, Jules Irenge wrote:
> Sparse reports a warning at release_extent_buffer()
> warning: context imbalance in release_extent_buffer() - unexpected unlock
>
> The root cause is the missing annotation at release_extent_buffer()
> Add the missing __releases(&eb->refs_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Added to misc-next, thanks.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 02/30] dax: Add missing annotations ofr dax_read_lock() and dax_read_unlock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng; +Cc: jbi.octave, linux-kernel, open list:DEVICE DIRECT ACCESS DAX
Sparse reports warning at dax_read_lock() and at dax_read_unlock()
warning: context imbalance in dax_read_lock() - wrong count at exit
warning: context imbalance in dax_read_unlock() - unexpected unlock
The root cause is the mnissing annotations at dax_read_lock()
and dax_read_unlock()
Add the missing __acquires(&dax_srcu) notations to dax_read_lock()
Add the missing __releases(&dax_srcu) annotation to dax_read_unlock()
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/dax/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 26a654dbc69a..f872a2fb98d4 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -28,13 +28,13 @@ static struct super_block *dax_superblock __read_mostly;
static struct hlist_head dax_host_list[DAX_HASH_SIZE];
static DEFINE_SPINLOCK(dax_host_lock);
-int dax_read_lock(void)
+int dax_read_lock(void) __acquires(&dax_srcu)
{
return srcu_read_lock(&dax_srcu);
}
EXPORT_SYMBOL_GPL(dax_read_lock);
-void dax_read_unlock(int id)
+void dax_read_unlock(int id) __releases(&dax_srcu)
{
srcu_read_unlock(&dax_srcu, id);
}
--
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 02/30] dax: Add missing annotations ofr dax_read_lock() and dax_read_unlock()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Dan Williams, Vishal Verma, Dave Jiang,
open list:DEVICE DIRECT ACCESS (DAX)
Sparse reports warning at dax_read_lock() and at dax_read_unlock()
warning: context imbalance in dax_read_lock() - wrong count at exit
warning: context imbalance in dax_read_unlock() - unexpected unlock
The root cause is the mnissing annotations at dax_read_lock()
and dax_read_unlock()
Add the missing __acquires(&dax_srcu) notations to dax_read_lock()
Add the missing __releases(&dax_srcu) annotation to dax_read_unlock()
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/dax/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 26a654dbc69a..f872a2fb98d4 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -28,13 +28,13 @@ static struct super_block *dax_superblock __read_mostly;
static struct hlist_head dax_host_list[DAX_HASH_SIZE];
static DEFINE_SPINLOCK(dax_host_lock);
-int dax_read_lock(void)
+int dax_read_lock(void) __acquires(&dax_srcu)
{
return srcu_read_lock(&dax_srcu);
}
EXPORT_SYMBOL_GPL(dax_read_lock);
-void dax_read_unlock(int id)
+void dax_read_unlock(int id) __releases(&dax_srcu)
{
srcu_read_unlock(&dax_srcu, id);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 02/30] dax: Add missing annotations ofr dax_read_lock() and dax_read_unlock()
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-24 1:23 ` Yi Zhang
-1 siblings, 0 replies; 125+ messages in thread
From: Yi Zhang @ 2020-02-24 1:23 UTC (permalink / raw)
To: Jules Irenge, boqun.feng; +Cc: linux-kernel, open list:DEVICE DIRECT ACCESS DAX
On 2/24/20 7:16 AM, Jules Irenge wrote:
> Sparse reports warning at dax_read_lock() and at dax_read_unlock()
>
> warning: context imbalance in dax_read_lock() - wrong count at exit
> warning: context imbalance in dax_read_unlock() - unexpected unlock
>
> The root cause is the mnissing annotations at dax_read_lock()
> and dax_read_unlock()
s/mnissing/missing
> Add the missing __acquires(&dax_srcu) notations to dax_read_lock()
> Add the missing __releases(&dax_srcu) annotation to dax_read_unlock()
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
> drivers/dax/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dax/super.c b/drivers/dax/super.c
> index 26a654dbc69a..f872a2fb98d4 100644
> --- a/drivers/dax/super.c
> +++ b/drivers/dax/super.c
> @@ -28,13 +28,13 @@ static struct super_block *dax_superblock __read_mostly;
> static struct hlist_head dax_host_list[DAX_HASH_SIZE];
> static DEFINE_SPINLOCK(dax_host_lock);
>
> -int dax_read_lock(void)
> +int dax_read_lock(void) __acquires(&dax_srcu)
> {
> return srcu_read_lock(&dax_srcu);
> }
> EXPORT_SYMBOL_GPL(dax_read_lock);
>
> -void dax_read_unlock(int id)
> +void dax_read_unlock(int id) __releases(&dax_srcu)
> {
> srcu_read_unlock(&dax_srcu, id);
> }
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 02/30] dax: Add missing annotations ofr dax_read_lock() and dax_read_unlock()
@ 2020-02-24 1:23 ` Yi Zhang
0 siblings, 0 replies; 125+ messages in thread
From: Yi Zhang @ 2020-02-24 1:23 UTC (permalink / raw)
To: Jules Irenge, boqun.feng; +Cc: linux-kernel, open list:DEVICE DIRECT ACCESS DAX
On 2/24/20 7:16 AM, Jules Irenge wrote:
> Sparse reports warning at dax_read_lock() and at dax_read_unlock()
>
> warning: context imbalance in dax_read_lock() - wrong count at exit
> warning: context imbalance in dax_read_unlock() - unexpected unlock
>
> The root cause is the mnissing annotations at dax_read_lock()
> and dax_read_unlock()
s/mnissing/missing
> Add the missing __acquires(&dax_srcu) notations to dax_read_lock()
> Add the missing __releases(&dax_srcu) annotation to dax_read_unlock()
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
> drivers/dax/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dax/super.c b/drivers/dax/super.c
> index 26a654dbc69a..f872a2fb98d4 100644
> --- a/drivers/dax/super.c
> +++ b/drivers/dax/super.c
> @@ -28,13 +28,13 @@ static struct super_block *dax_superblock __read_mostly;
> static struct hlist_head dax_host_list[DAX_HASH_SIZE];
> static DEFINE_SPINLOCK(dax_host_lock);
>
> -int dax_read_lock(void)
> +int dax_read_lock(void) __acquires(&dax_srcu)
> {
> return srcu_read_lock(&dax_srcu);
> }
> EXPORT_SYMBOL_GPL(dax_read_lock);
>
> -void dax_read_unlock(int id)
> +void dax_read_unlock(int id) __releases(&dax_srcu)
> {
> srcu_read_unlock(&dax_srcu, id);
> }
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 03/30] xfs: Add missing annotation to xfs_ail_check()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
2020-02-23 23:16 ` [PATCH 01/30] btrfs: Add missing annotation for release_extent_buffer() Jules Irenge
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-25 15:44 ` Darrick J. Wong
2020-02-23 23:16 ` Jules Irenge
` (26 subsequent siblings)
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Darrick J. Wong, supporter:XFS FILESYSTEM
Sparse reports a warning at xfs_ail_check()
warning: context imbalance in xfs_ail_check() - unexpected unlock
The root cause is the missing annotation at xfs_ail_check()
Add the missing __must_hold(&ailp->ail_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
fs/xfs/xfs_trans_ail.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 00cc5b8734be..58d4ef1b4c05 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -32,6 +32,7 @@ STATIC void
xfs_ail_check(
struct xfs_ail *ailp,
struct xfs_log_item *lip)
+ __must_hold(&ailp->ail_lock)
{
struct xfs_log_item *prev_lip;
struct xfs_log_item *next_lip;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 03/30] xfs: Add missing annotation to xfs_ail_check()
2020-02-23 23:16 ` [PATCH 03/30] xfs: Add missing annotation to xfs_ail_check() Jules Irenge
@ 2020-02-25 15:44 ` Darrick J. Wong
0 siblings, 0 replies; 125+ messages in thread
From: Darrick J. Wong @ 2020-02-25 15:44 UTC (permalink / raw)
To: Jules Irenge; +Cc: boqun.feng, linux-kernel, supporter:XFS FILESYSTEM
On Sun, Feb 23, 2020 at 11:16:44PM +0000, Jules Irenge wrote:
> Sparse reports a warning at xfs_ail_check()
>
> warning: context imbalance in xfs_ail_check() - unexpected unlock
>
> The root cause is the missing annotation at xfs_ail_check()
>
> Add the missing __must_hold(&ailp->ail_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Seems reasonable, though I'm wondering if this is a treewide change you
seek to apply yourself, or merely a large patch series to merge through
the individual subsystem maintainers?
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/xfs_trans_ail.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index 00cc5b8734be..58d4ef1b4c05 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -32,6 +32,7 @@ STATIC void
> xfs_ail_check(
> struct xfs_ail *ailp,
> struct xfs_log_item *lip)
> + __must_hold(&ailp->ail_lock)
> {
> struct xfs_log_item *prev_lip;
> struct xfs_log_item *next_lip;
> --
> 2.24.1
>
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 04/30] sctp: Add missing annotation for sctp_err_finish()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Vlad Yasevich, Neil Horman,
Marcelo Ricardo Leitner, David S. Miller, Jakub Kicinski,
open list:SCTP PROTOCOL, open list:NETWORKING [GENERAL]
Sparse reports a warning at sctp_err_finish()
warning: context imbalance in sctp_err_finish() - unexpected unlock
The root cause is a missing annotation at sctp_err_finish()
Add the missing __releases(&((__sk)->sk_lock.slock)) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/sctp/input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sctp/input.c b/net/sctp/input.c
index efaaefc3bb1c..55d4fc6f371d 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -548,6 +548,7 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb,
/* Common cleanup code for icmp/icmpv6 error handler. */
void sctp_err_finish(struct sock *sk, struct sctp_transport *t)
+ __releases(&((__sk)->sk_lock.slock))
{
bh_unlock_sock(sk);
sctp_transport_put(t);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 04/30] sctp: Add missing annotation for sctp_err_finish()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Vlad Yasevich, Neil Horman,
Marcelo Ricardo Leitner, David S. Miller, Jakub Kicinski,
open list:SCTP PROTOCOL, open list:NETWORKING [GENERAL]
Sparse reports a warning at sctp_err_finish()
warning: context imbalance in sctp_err_finish() - unexpected unlock
The root cause is a missing annotation at sctp_err_finish()
Add the missing __releases(&((__sk)->sk_lock.slock)) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/sctp/input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sctp/input.c b/net/sctp/input.c
index efaaefc3bb1c..55d4fc6f371d 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -548,6 +548,7 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb,
/* Common cleanup code for icmp/icmpv6 error handler. */
void sctp_err_finish(struct sock *sk, struct sctp_transport *t)
+ __releases(&((__sk)->sk_lock.slock))
{
bh_unlock_sock(sk);
sctp_transport_put(t);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 04/30] sctp: Add missing annotation for sctp_err_finish()
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-24 21:28 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:28 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, vyasevich, nhorman, marcelo.leitner,
kuba, linux-sctp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:45 +0000
> Sparse reports a warning at sctp_err_finish()
> warning: context imbalance in sctp_err_finish() - unexpected unlock
>
> The root cause is a missing annotation at sctp_err_finish()
> Add the missing __releases(&((__sk)->sk_lock.slock)) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 04/30] sctp: Add missing annotation for sctp_err_finish()
@ 2020-02-24 21:28 ` David Miller
0 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:28 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, vyasevich, nhorman, marcelo.leitner,
kuba, linux-sctp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:45 +0000
> Sparse reports a warning at sctp_err_finish()
> warning: context imbalance in sctp_err_finish() - unexpected unlock
>
> The root cause is a missing annotation at sctp_err_finish()
> Add the missing __releases(&((__sk)->sk_lock.slock)) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 05/30] sctp: Add missing annotation for sctp_transport_walk_start()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Vlad Yasevich, Neil Horman,
Marcelo Ricardo Leitner, David S. Miller, Jakub Kicinski,
open list:SCTP PROTOCOL, open list:NETWORKING [GENERAL]
Sparse reports a warning at sctp_transport_walk_start()
warning: context imbalance in sctp_transport_walk_start
- wrong count at exit
The root cause is the missing annotation at sctp_transport_walk_start()
Add the missing __acquires(RCU) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 1b56fc440606..05be67bb0474 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5333,7 +5333,7 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
EXPORT_SYMBOL_GPL(sctp_get_sctp_info);
/* use callback to avoid exporting the core structure */
-void sctp_transport_walk_start(struct rhashtable_iter *iter)
+void sctp_transport_walk_start(struct rhashtable_iter *iter) __acquires(RCU)
{
rhltable_walk_enter(&sctp_transport_hashtable, iter);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 05/30] sctp: Add missing annotation for sctp_transport_walk_start()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Vlad Yasevich, Neil Horman,
Marcelo Ricardo Leitner, David S. Miller, Jakub Kicinski,
open list:SCTP PROTOCOL, open list:NETWORKING [GENERAL]
Sparse reports a warning at sctp_transport_walk_start()
warning: context imbalance in sctp_transport_walk_start
- wrong count at exit
The root cause is the missing annotation at sctp_transport_walk_start()
Add the missing __acquires(RCU) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 1b56fc440606..05be67bb0474 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5333,7 +5333,7 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
EXPORT_SYMBOL_GPL(sctp_get_sctp_info);
/* use callback to avoid exporting the core structure */
-void sctp_transport_walk_start(struct rhashtable_iter *iter)
+void sctp_transport_walk_start(struct rhashtable_iter *iter) __acquires(RCU)
{
rhltable_walk_enter(&sctp_transport_hashtable, iter);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 05/30] sctp: Add missing annotation for sctp_transport_walk_start()
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-24 21:28 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:28 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, vyasevich, nhorman, marcelo.leitner,
kuba, linux-sctp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:46 +0000
> Sparse reports a warning at sctp_transport_walk_start()
>
> warning: context imbalance in sctp_transport_walk_start
> - wrong count at exit
>
> The root cause is the missing annotation at sctp_transport_walk_start()
> Add the missing __acquires(RCU) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 05/30] sctp: Add missing annotation for sctp_transport_walk_start()
@ 2020-02-24 21:28 ` David Miller
0 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:28 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, vyasevich, nhorman, marcelo.leitner,
kuba, linux-sctp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:46 +0000
> Sparse reports a warning at sctp_transport_walk_start()
>
> warning: context imbalance in sctp_transport_walk_start
> - wrong count at exit
>
> The root cause is the missing annotation at sctp_transport_walk_start()
> Add the missing __acquires(RCU) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Vlad Yasevich, Neil Horman,
Marcelo Ricardo Leitner, David S. Miller, Jakub Kicinski,
open list:SCTP PROTOCOL, open list:NETWORKING [GENERAL]
Sparse reports a warning at sctp_transport_walk_stop()
warning: context imbalance in sctp_transport_walk_stop
- wrong count at exit
The root cause is the missing annotation at sctp_transport_walk_stop()
Add the missing __releases(RCU) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 05be67bb0474..fed26a1e9518 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5340,7 +5340,7 @@ void sctp_transport_walk_start(struct rhashtable_iter *iter) __acquires(RCU)
rhashtable_walk_start(iter);
}
-void sctp_transport_walk_stop(struct rhashtable_iter *iter)
+void sctp_transport_walk_stop(struct rhashtable_iter *iter) __releases(RCU)
{
rhashtable_walk_stop(iter);
rhashtable_walk_exit(iter);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Vlad Yasevich, Neil Horman,
Marcelo Ricardo Leitner, David S. Miller, Jakub Kicinski,
open list:SCTP PROTOCOL, open list:NETWORKING [GENERAL]
Sparse reports a warning at sctp_transport_walk_stop()
warning: context imbalance in sctp_transport_walk_stop
- wrong count at exit
The root cause is the missing annotation at sctp_transport_walk_stop()
Add the missing __releases(RCU) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 05be67bb0474..fed26a1e9518 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5340,7 +5340,7 @@ void sctp_transport_walk_start(struct rhashtable_iter *iter) __acquires(RCU)
rhashtable_walk_start(iter);
}
-void sctp_transport_walk_stop(struct rhashtable_iter *iter)
+void sctp_transport_walk_stop(struct rhashtable_iter *iter) __releases(RCU)
{
rhashtable_walk_stop(iter);
rhashtable_walk_exit(iter);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-24 21:28 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:28 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, vyasevich, nhorman, marcelo.leitner,
kuba, linux-sctp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:47 +0000
> Sparse reports a warning at sctp_transport_walk_stop()
>
> warning: context imbalance in sctp_transport_walk_stop
> - wrong count at exit
>
> The root cause is the missing annotation at sctp_transport_walk_stop()
> Add the missing __releases(RCU) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()
@ 2020-02-24 21:28 ` David Miller
0 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:28 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, vyasevich, nhorman, marcelo.leitner,
kuba, linux-sctp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:47 +0000
> Sparse reports a warning at sctp_transport_walk_stop()
>
> warning: context imbalance in sctp_transport_walk_stop
> - wrong count at exit
>
> The root cause is the missing annotation at sctp_transport_walk_stop()
> Add the missing __releases(RCU) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 07/30] net: Add missing annotation for llc_seq_start()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (5 preceding siblings ...)
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-24 21:28 ` David Miller
2020-02-23 23:16 ` Jules Irenge
` (22 subsequent siblings)
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, David S. Miller, Jakub Kicinski,
open list:LLC (802.2)
Sparse reports a warning at llc_seq_start()
warning: context imbalance in llc_seq_start() - wrong count at exit
The root cause is the msiing annotation at llc_seq_start()
Add the missing __acquires(RCU) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/llc/llc_proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c
index f3a36c16a5e7..a4eccb98220a 100644
--- a/net/llc/llc_proc.c
+++ b/net/llc/llc_proc.c
@@ -56,7 +56,7 @@ static struct sock *llc_get_sk_idx(loff_t pos)
return sk;
}
-static void *llc_seq_start(struct seq_file *seq, loff_t *pos)
+static void *llc_seq_start(struct seq_file *seq, loff_t *pos) __acquires(RCU)
{
loff_t l = *pos;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 08/30] netrom: Add missing annotation for nr_info_start()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_info_start()
warning: context imbalance in nr_info_start() - wrong count at exit
The root cause is the missing annotation at nr_info_start()
Add the missing __acquires(&nr_list_lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/af_netrom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 58d5373c513c..8be06e61ff03 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1230,6 +1230,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
#ifdef CONFIG_PROC_FS
static void *nr_info_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&nr_list_lock)
{
spin_lock_bh(&nr_list_lock);
return seq_hlist_start_head(&nr_list, *pos);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 08/30] netrom: Add missing annotation for nr_info_start()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_info_start()
warning: context imbalance in nr_info_start() - wrong count at exit
The root cause is the missing annotation at nr_info_start()
Add the missing __acquires(&nr_list_lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/af_netrom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 58d5373c513c..8be06e61ff03 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1230,6 +1230,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
#ifdef CONFIG_PROC_FS
static void *nr_info_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&nr_list_lock)
{
spin_lock_bh(&nr_list_lock);
return seq_hlist_start_head(&nr_list, *pos);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 08/30] netrom: Add missing annotation for nr_info_start()
2020-02-23 23:16 ` Jules Irenge
(?)
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, ralf, kuba, linux-hams, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:49 +0000
> Sparse reports a warning at nr_info_start()
> warning: context imbalance in nr_info_start() - wrong count at exit
> The root cause is the missing annotation at nr_info_start()
> Add the missing __acquires(&nr_list_lock)
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 09/30] netrom: Add missing annotation for nr_info_stop()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_info_stop()
warning: context imbalance in nr_info_stop() - unexpected unlock
The root cause is the missing annotation at nr_info_stop()
Add the missing __releases(&nr_list_lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/af_netrom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 8be06e61ff03..7b1a74f74aad 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1242,6 +1242,7 @@ static void *nr_info_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void nr_info_stop(struct seq_file *seq, void *v)
+ __releases(&nr_list_lock)
{
spin_unlock_bh(&nr_list_lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 09/30] netrom: Add missing annotation for nr_info_stop()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_info_stop()
warning: context imbalance in nr_info_stop() - unexpected unlock
The root cause is the missing annotation at nr_info_stop()
Add the missing __releases(&nr_list_lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/af_netrom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 8be06e61ff03..7b1a74f74aad 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1242,6 +1242,7 @@ static void *nr_info_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void nr_info_stop(struct seq_file *seq, void *v)
+ __releases(&nr_list_lock)
{
spin_unlock_bh(&nr_list_lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 09/30] netrom: Add missing annotation for nr_info_stop()
2020-02-23 23:16 ` Jules Irenge
(?)
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, ralf, kuba, linux-hams, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:50 +0000
> Sparse reports a warning at nr_info_stop()
> warning: context imbalance in nr_info_stop() - unexpected unlock
> The root cause is the missing annotation at nr_info_stop()
> Add the missing __releases(&nr_list_lock)
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 10/30] net: netrom: Add missing annotation for nr_node_start()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_node_start()
warning: context imbalance in nr_node_start() - wrong count at exit
The root cause is the missing annotation at nr_node_start()
Add the missing __acquires(&nr_node_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index d41335bad1f8..fe278fc24153 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -838,6 +838,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
#ifdef CONFIG_PROC_FS
static void *nr_node_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&nr_node_list_lock)
{
spin_lock_bh(&nr_node_list_lock);
return seq_hlist_start_head(&nr_node_list, *pos);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 10/30] net: netrom: Add missing annotation for nr_node_start()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_node_start()
warning: context imbalance in nr_node_start() - wrong count at exit
The root cause is the missing annotation at nr_node_start()
Add the missing __acquires(&nr_node_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index d41335bad1f8..fe278fc24153 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -838,6 +838,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
#ifdef CONFIG_PROC_FS
static void *nr_node_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&nr_node_list_lock)
{
spin_lock_bh(&nr_node_list_lock);
return seq_hlist_start_head(&nr_node_list, *pos);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 10/30] net: netrom: Add missing annotation for nr_node_start()
2020-02-23 23:16 ` Jules Irenge
(?)
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, ralf, kuba, linux-hams, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:51 +0000
> Sparse reports a warning at nr_node_start()
> warning: context imbalance in nr_node_start() - wrong count at exit
> The root cause is the missing annotation at nr_node_start()
> Add the missing __acquires(&nr_node_list_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 11/30] net: netrom: Add missing annotation for nr_node_stop()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_node_stop()
warning: context imbalance in nr_node_stop() - wrong count at exit
The root cause is the missing annotation at nr_node_stop()
Add the missing __releases(&nr_node_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index fe278fc24153..637a743c060d 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -850,6 +850,7 @@ static void *nr_node_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void nr_node_stop(struct seq_file *seq, void *v)
+ __releases(&nr_node_list_lock)
{
spin_unlock_bh(&nr_node_list_lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 11/30] net: netrom: Add missing annotation for nr_node_stop()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_node_stop()
warning: context imbalance in nr_node_stop() - wrong count at exit
The root cause is the missing annotation at nr_node_stop()
Add the missing __releases(&nr_node_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index fe278fc24153..637a743c060d 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -850,6 +850,7 @@ static void *nr_node_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void nr_node_stop(struct seq_file *seq, void *v)
+ __releases(&nr_node_list_lock)
{
spin_unlock_bh(&nr_node_list_lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 11/30] net: netrom: Add missing annotation for nr_node_stop()
2020-02-23 23:16 ` Jules Irenge
(?)
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, ralf, kuba, linux-hams, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:52 +0000
> Sparse reports a warning at nr_node_stop()
> warning: context imbalance in nr_node_stop() - wrong count at exit
> The root cause is the missing annotation at nr_node_stop()
> Add the missing __releases(&nr_node_list_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 12/30] net: netrom: Add missing annotation for nr_neigh_start()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_neigh_start()
warning: context imbalance in nr_neigh_start() - wrong count at exit
The root cause is the missing annotation at nr_neigh_start()
Add the missing __acquires(&nr_neigh_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 637a743c060d..33e7b91fc805 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -895,6 +895,7 @@ const struct seq_operations nr_node_seqops = {
};
static void *nr_neigh_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&nr_neigh_list_lock)
{
spin_lock_bh(&nr_neigh_list_lock);
return seq_hlist_start_head(&nr_neigh_list, *pos);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 12/30] net: netrom: Add missing annotation for nr_neigh_start()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_neigh_start()
warning: context imbalance in nr_neigh_start() - wrong count at exit
The root cause is the missing annotation at nr_neigh_start()
Add the missing __acquires(&nr_neigh_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 637a743c060d..33e7b91fc805 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -895,6 +895,7 @@ const struct seq_operations nr_node_seqops = {
};
static void *nr_neigh_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&nr_neigh_list_lock)
{
spin_lock_bh(&nr_neigh_list_lock);
return seq_hlist_start_head(&nr_neigh_list, *pos);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 12/30] net: netrom: Add missing annotation for nr_neigh_start()
2020-02-23 23:16 ` Jules Irenge
(?)
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, ralf, kuba, linux-hams, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:53 +0000
> Sparse reports a warning at nr_neigh_start()
> warning: context imbalance in nr_neigh_start() - wrong count at exit
> The root cause is the missing annotation at nr_neigh_start()
> Add the missing __acquires(&nr_neigh_list_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 13/30] net: netrom: Add missing annotation for nr_neigh_stop()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_neigh_stop()
warning: context imbalance in nr_neigh_stop() - unexpected unlock
The root cause is the missing annotation at nr_neigh_stop()
Add the missing __releases(&nr_neigh_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 33e7b91fc805..79f12d8c7b86 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -907,6 +907,7 @@ static void *nr_neigh_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void nr_neigh_stop(struct seq_file *seq, void *v)
+ __releases(&nr_neigh_list_lock)
{
spin_unlock_bh(&nr_neigh_list_lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 13/30] net: netrom: Add missing annotation for nr_neigh_stop()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Ralf Baechle, David S. Miller,
Jakub Kicinski, open list:NETROM NETWORK LAYER,
open list:NETWORKING [GENERAL]
Sparse reports a warning at nr_neigh_stop()
warning: context imbalance in nr_neigh_stop() - unexpected unlock
The root cause is the missing annotation at nr_neigh_stop()
Add the missing __releases(&nr_neigh_list_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/netrom/nr_route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 33e7b91fc805..79f12d8c7b86 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -907,6 +907,7 @@ static void *nr_neigh_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void nr_neigh_stop(struct seq_file *seq, void *v)
+ __releases(&nr_neigh_list_lock)
{
spin_unlock_bh(&nr_neigh_list_lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 13/30] net: netrom: Add missing annotation for nr_neigh_stop()
2020-02-23 23:16 ` Jules Irenge
(?)
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, ralf, kuba, linux-hams, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:54 +0000
> Sparse reports a warning at nr_neigh_stop()
> warning: context imbalance in nr_neigh_stop() - unexpected unlock
> The root cause is the missing annotation at nr_neigh_stop()
> Add the missing __releases(&nr_neigh_list_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 14/30] dccp: Add missing annotation for dccp_child_process()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Gerrit Renker, David S. Miller,
Jakub Kicinski, open list:DCCP PROTOCOL,
open list:NETWORKING [GENERAL]
Sparse reports a warning at dccp_child_process()
warning: context imbalance in dccp_child_process() - unexpected unlock
The root cause is the missing annotation at dccp_child_process()
Add the missing __releases(child) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/dccp/minisocks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 25187528c308..c5c74a34d139 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -216,6 +216,7 @@ EXPORT_SYMBOL_GPL(dccp_check_req);
*/
int dccp_child_process(struct sock *parent, struct sock *child,
struct sk_buff *skb)
+ __releases(child)
{
int ret = 0;
const int state = child->sk_state;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 14/30] dccp: Add missing annotation for dccp_child_process()
@ 2020-02-23 23:16 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: dccp
Sparse reports a warning at dccp_child_process()
warning: context imbalance in dccp_child_process() - unexpected unlock
The root cause is the missing annotation at dccp_child_process()
Add the missing __releases(child) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/dccp/minisocks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 25187528c308..c5c74a34d139 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -216,6 +216,7 @@ EXPORT_SYMBOL_GPL(dccp_check_req);
*/
int dccp_child_process(struct sock *parent, struct sock *child,
struct sk_buff *skb)
+ __releases(child)
{
int ret = 0;
const int state = child->sk_state;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 14/30] dccp: Add missing annotation for dccp_child_process()
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-24 21:29 ` David Miller
-1 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave; +Cc: boqun.feng, linux-kernel, gerrit, kuba, dccp, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:55 +0000
> Sparse reports a warning at dccp_child_process()
> warning: context imbalance in dccp_child_process() - unexpected unlock
> The root cause is the missing annotation at dccp_child_process()
> Add the missing __releases(child) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 14/30] dccp: Add missing annotation for dccp_child_process()
@ 2020-02-24 21:29 ` David Miller
0 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: dccp
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:55 +0000
> Sparse reports a warning at dccp_child_process()
> warning: context imbalance in dccp_child_process() - unexpected unlock
> The root cause is the missing annotation at dccp_child_process()
> Add the missing __releases(child) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 15/30] af_unix: Add missing annotation for unix_wait_for_peer()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (13 preceding siblings ...)
2020-02-23 23:16 ` Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-24 21:29 ` David Miller
2020-02-23 23:16 ` [PATCH 16/30] proc: Add missing annotation for close_pdeo() Jules Irenge
` (14 subsequent siblings)
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, David S. Miller, Jakub Kicinski,
Allison Randal, Steffen Klassert, Jens Axboe, Hannes Reinecke,
Kirill Tkhai, Eric Dumazet, Thomas Gleixner, Pankaj Bharadiya,
Arnd Bergmann, Qian Cai, open list:NETWORKING [GENERAL]
Sparse reports a warning unix_wait_for_peer()
warning: context imbalance in unix_wait_for_peer() - unexpected unlock
The root cause is the missing annotation at unix_wait_for_peer()
Add the missing annotation __releases(&unix_sk(other)->lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/unix/af_unix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 62c12cb5763e..cbd7dc01e147 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1207,6 +1207,7 @@ static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
}
static long unix_wait_for_peer(struct sock *other, long timeo)
+ __releases(&unix_sk(other)->lock)
{
struct unix_sock *u = unix_sk(other);
int sched;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 15/30] af_unix: Add missing annotation for unix_wait_for_peer()
2020-02-23 23:16 ` [PATCH 15/30] af_unix: Add missing annotation for unix_wait_for_peer() Jules Irenge
@ 2020-02-24 21:29 ` David Miller
0 siblings, 0 replies; 125+ messages in thread
From: David Miller @ 2020-02-24 21:29 UTC (permalink / raw)
To: jbi.octave
Cc: boqun.feng, linux-kernel, kuba, allison, steffen.klassert, axboe,
hare, ktkhai, edumazet, tglx, pankaj.laxminarayan.bharadiya,
arnd, cai, netdev
From: Jules Irenge <jbi.octave@gmail.com>
Date: Sun, 23 Feb 2020 23:16:56 +0000
> Sparse reports a warning unix_wait_for_peer()
>
> warning: context imbalance in unix_wait_for_peer() - unexpected unlock
>
> The root cause is the missing annotation at unix_wait_for_peer()
> Add the missing annotation __releases(&unix_sk(other)->lock)
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 16/30] proc: Add missing annotation for close_pdeo()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (14 preceding siblings ...)
2020-02-23 23:16 ` [PATCH 15/30] af_unix: Add missing annotation for unix_wait_for_peer() Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Jules Irenge
` (13 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Alexey Dobriyan, Al Viro,
Andrew Morton, David Howells, open list:PROC FILESYSTEM
Sparse reports a warning at close_pdeo()
warning: context imbalance in close_pdeo() - unexpected unlock
The root cause is the missing annotation at close_pdeo()
Add the missing __releases(&pde->pde_unload_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
fs/proc/inode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6da18316d209..1f33cb7a6c47 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -139,6 +139,7 @@ static void unuse_pde(struct proc_dir_entry *pde)
/* pde is locked on entry, unlocked on exit */
static void close_pdeo(struct proc_dir_entry *pde, struct pde_opener *pdeo)
+ __releases(&pde->pde_unload_lock)
{
/*
* close() (proc_reg_release()) can't delete an entry and proceed:
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (15 preceding siblings ...)
2020-02-23 23:16 ` [PATCH 16/30] proc: Add missing annotation for close_pdeo() Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:16 ` [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Jules Irenge
` (12 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Andrew Morton,
open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR
Sparse reports a warning at zs_map_object()
context imbalance in zs_map_object() - wrong count at exit
The root cause is the missing annotation at zs_map_object()
Add the missing __acquires(zspage)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
mm/zsmalloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2aa2d524a343..9d3f9b3d22aa 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1290,6 +1290,7 @@ EXPORT_SYMBOL_GPL(zs_get_total_pages);
*/
void *zs_map_object(struct zs_pool *pool, unsigned long handle,
enum zs_mapmode mm)
+ __acquires(zspage)
{
struct zspage *zspage;
struct page *page;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (16 preceding siblings ...)
2020-02-23 23:16 ` [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Jules Irenge
@ 2020-02-23 23:16 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock() Jules Irenge
` (11 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Andrew Morton,
open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR
Sparse reports a warning at zs_unmap_object()
context imbalance in zs_unmap_object() - unexpected unlock
The root cause is the missing annotation at zs_unmap_object()
Add the missing __releases(zspage)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
mm/zsmalloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 9d3f9b3d22aa..10a96651cb97 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1349,6 +1349,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle,
EXPORT_SYMBOL_GPL(zs_map_object);
void zs_unmap_object(struct zs_pool *pool, unsigned long handle)
+ __releases(zspage)
{
struct zspage *zspage;
struct page *page;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (17 preceding siblings ...)
2020-02-23 23:16 ` [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() Jules Irenge
` (10 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Andrew Morton,
open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR
Sparse reports a warning at migrate_write_lock()
warning: context imbalance in migrate_write_lock() - wrong count at exit
The root cause is the missing annotation at migrate_write_lock()
Add the missing __acquires(&zspage->lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
mm/zsmalloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 10a96651cb97..7ec69a1140cf 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1846,6 +1846,7 @@ static void migrate_read_unlock(struct zspage *zspage) __releases(&zspage->lock)
}
static void migrate_write_lock(struct zspage *zspage)
+ __acquires(&zspage->lock)
{
write_lock(&zspage->lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (18 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 21/30] scsi: csiostor: Add missing annotation for csio_scsi_cleanup_io_q() Jules Irenge
` (9 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Andrew Morton,
open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR
Sparse reports a warning at migrate_write_unlock()
warning: context imbalance in migrate_write_unlock() - unexpected unlock
The root cause is the missing annotation at migrate_write_unlock()
Add the missing __releases(&zspage->lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
mm/zsmalloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 7ec69a1140cf..cb5541d06823 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1852,6 +1852,7 @@ static void migrate_write_lock(struct zspage *zspage)
}
static void migrate_write_unlock(struct zspage *zspage)
+ __releases(&zspage->lock)
{
write_unlock(&zspage->lock);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 21/30] scsi: csiostor: Add missing annotation for csio_scsi_cleanup_io_q()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (19 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock() Jules Irenge
` (8 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, James E.J. Bottomley,
Martin K. Petersen, Nathan Chancellor, Varun Prakash,
Hannes Reinecke, open list:SCSI SUBSYSTEM
Sparse reports a warning at csio_scsi_cleanup_io_q()
warning: context imbalance in csio_scsi_cleanup_io_q() - unexpected unlock
The root cause is the missing annotation at csio_scsi_cleanup_io_q()
Add the missing __must_hold(&hw->lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/scsi/csiostor/csio_scsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 00cf33573136..77cba766ae52 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -1157,6 +1157,7 @@ csio_scsi_cmpl_handler(struct csio_hw *hw, void *wr, uint32_t len,
*/
void
csio_scsi_cleanup_io_q(struct csio_scsim *scm, struct list_head *q)
+ __must_hold(&hw->lock)
{
struct csio_hw *hw = scm->hw;
struct csio_ioreq *ioreq;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (20 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 21/30] scsi: csiostor: Add missing annotation for csio_scsi_cleanup_io_q() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-03-04 11:00 ` Rafael J. Wysocki
2020-02-23 23:17 ` [PATCH 23/30] ACPI: OSL: Add missing annotation for acpi_os_release_lock() Jules Irenge
` (7 subsequent siblings)
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Rafael J. Wysocki, Len Brown, open list:ACPI
Sparse reports a warning at acpi_os_acquire_lock()
warning: context imbalance in acpi_os_acquire_lock() - unexpected unlock
The root cause is the missing annotation at acpi_os_acquire_lock()
Add the missing annotation __acquires(lockp)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/acpi/osl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 41168c027a5a..7094abc5ffc6 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1598,6 +1598,7 @@ void acpi_os_delete_lock(acpi_spinlock handle)
*/
acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
+ __acquires(lockp)
{
acpi_cpu_flags flags;
spin_lock_irqsave(lockp, flags);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock()
2020-02-23 23:17 ` [PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock() Jules Irenge
@ 2020-03-04 11:00 ` Rafael J. Wysocki
0 siblings, 0 replies; 125+ messages in thread
From: Rafael J. Wysocki @ 2020-03-04 11:00 UTC (permalink / raw)
To: Jules Irenge; +Cc: boqun.feng, linux-kernel, Len Brown, open list:ACPI
On Monday, February 24, 2020 12:17:03 AM CET Jules Irenge wrote:
> Sparse reports a warning at acpi_os_acquire_lock()
>
> warning: context imbalance in acpi_os_acquire_lock() - unexpected unlock
>
> The root cause is the missing annotation at acpi_os_acquire_lock()
> Add the missing annotation __acquires(lockp)
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
> drivers/acpi/osl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 41168c027a5a..7094abc5ffc6 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -1598,6 +1598,7 @@ void acpi_os_delete_lock(acpi_spinlock handle)
> */
>
> acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
> + __acquires(lockp)
> {
> acpi_cpu_flags flags;
> spin_lock_irqsave(lockp, flags);
>
Merged with the [23/30] and applied with modified subject and changelog as
5.7 material.
Thanks!
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 23/30] ACPI: OSL: Add missing annotation for acpi_os_release_lock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (21 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 24/30] dmaengine: mic_x100_dma: Add missing annotation for mic_dma_tx_submit_unlock() Jules Irenge
` (6 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Rafael J. Wysocki, Len Brown, open list:ACPI
Sparse reports a warning at acpi_os_release_lock()
warning: context imbalance in acpi_os_release_lock() - unexpected unlock
The root cause is the missing annotation at acpi_os_release_lock()
Add the missing annotation __releases(lockp)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/acpi/osl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 7094abc5ffc6..762c5d50b8fe 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1610,6 +1610,7 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
*/
void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
+ __releases(lockp)
{
spin_unlock_irqrestore(lockp, flags);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 24/30] dmaengine: mic_x100_dma: Add missing annotation for mic_dma_tx_submit_unlock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (22 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 23/30] ACPI: OSL: Add missing annotation for acpi_os_release_lock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 25/30] zram: Add missing annotatin for zram_slot_lock() Jules Irenge
` (5 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Sudeep Dutt, Ashutosh Dixit,
Vinod Koul, Dan Williams,
open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
Sparse reports a warning dma_cookie_t mic_dma_tx_submit_unlock()
warning: context imbalance in mic_dma_tx_submit_unlock()
- unexpected unlock
The root cause is the missing annotation at mic_dma_tx_submit_unlock()
Add the missing annotation __releases(&mic_ch->prep_lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/dma/mic_x100_dma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index fea8608a7810..d15c41151d09 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -236,6 +236,7 @@ static inline void mic_dma_update_pending(struct mic_dma_chan *ch)
}
static dma_cookie_t mic_dma_tx_submit_unlock(struct dma_async_tx_descriptor *tx)
+ __releases(&mic_ch->prep_lock)
{
struct mic_dma_chan *mic_ch = to_mic_dma_chan(tx->chan);
dma_cookie_t cookie;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 25/30] zram: Add missing annotatin for zram_slot_lock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (23 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 24/30] dmaengine: mic_x100_dma: Add missing annotation for mic_dma_tx_submit_unlock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock() Jules Irenge
` (4 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Jens Axboe, open list:BLOCK LAYER
Sparse reports a warning at zram_slot_lock()
warning: context imbalance in zram_slot_lock() - wrong count at exit
The root cause is the missing annotation at zram_slot_lock()
Add the missing __acquires(ZRAM_LOCK) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/block/zram/zram_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1bdb5793842b..1462b1bfec11 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -62,6 +62,7 @@ static int zram_slot_trylock(struct zram *zram, u32 index)
}
static void zram_slot_lock(struct zram *zram, u32 index)
+ __acquires(ZRAM_LOCK)
{
bit_spin_lock(ZRAM_LOCK, &zram->table[index].flags);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (24 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 25/30] zram: Add missing annotatin for zram_slot_lock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 27/30] habanalabs: Add missing annotation for goya_hw_queues_lock() Jules Irenge
` (3 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Jens Axboe, open list:BLOCK LAYER
Sparse reports a warning at zram_slot_unlock()
warning: context imbalance in zram_slot_unlock() - unexpected unlock
The root cause is the missing annotation at zram_slot_unlock()
Add the missing __releases(ZRAM_LOCK) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/block/zram/zram_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1462b1bfec11..a38725452966 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -68,6 +68,7 @@ static void zram_slot_lock(struct zram *zram, u32 index)
}
static void zram_slot_unlock(struct zram *zram, u32 index)
+ __releases(ZRAM_LOCK)
{
bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 27/30] habanalabs: Add missing annotation for goya_hw_queues_lock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (25 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-25 11:55 ` Oded Gabbay
2020-02-23 23:17 ` [PATCH 28/30] habanalabs: Add missing annotation for goya_hw_queues_unlock() Jules Irenge
` (2 subsequent siblings)
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Oded Gabbay, Arnd Bergmann,
Greg Kroah-Hartman, Tomer Tayar, Omer Shpigelman, Dalit Ben Zoor
Sparse reports a warning at goya_hw_queues_lock()
warning: context imbalance in goya_hw_queues_lock() - wrong count at exit
The root cause is a missing annotation at goya_hw_queues_lock()
Add the missing __acquires(&goya->hw_queues_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/misc/habanalabs/goya/goya.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index 7344e8a222ae..8ca7ee57cbc1 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -5073,6 +5073,7 @@ static bool goya_is_device_idle(struct hl_device *hdev, u32 *mask,
}
static void goya_hw_queues_lock(struct hl_device *hdev)
+ __acquires(&goya->hw_queues_lock)
{
struct goya_device *goya = hdev->asic_specific;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 27/30] habanalabs: Add missing annotation for goya_hw_queues_lock()
2020-02-23 23:17 ` [PATCH 27/30] habanalabs: Add missing annotation for goya_hw_queues_lock() Jules Irenge
@ 2020-02-25 11:55 ` Oded Gabbay
0 siblings, 0 replies; 125+ messages in thread
From: Oded Gabbay @ 2020-02-25 11:55 UTC (permalink / raw)
To: Jules Irenge
Cc: boqun.feng, Linux-Kernel@Vger. Kernel. Org, Arnd Bergmann,
Greg Kroah-Hartman, Tomer Tayar, Omer Shpigelman, Dalit Ben Zoor
On Mon, Feb 24, 2020 at 1:18 AM Jules Irenge <jbi.octave@gmail.com> wrote:
>
> Sparse reports a warning at goya_hw_queues_lock()
> warning: context imbalance in goya_hw_queues_lock() - wrong count at exit
> The root cause is a missing annotation at goya_hw_queues_lock()
> Add the missing __acquires(&goya->hw_queues_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
> drivers/misc/habanalabs/goya/goya.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
> index 7344e8a222ae..8ca7ee57cbc1 100644
> --- a/drivers/misc/habanalabs/goya/goya.c
> +++ b/drivers/misc/habanalabs/goya/goya.c
> @@ -5073,6 +5073,7 @@ static bool goya_is_device_idle(struct hl_device *hdev, u32 *mask,
> }
>
> static void goya_hw_queues_lock(struct hl_device *hdev)
> + __acquires(&goya->hw_queues_lock)
> {
> struct goya_device *goya = hdev->asic_specific;
>
> --
> 2.24.1
>
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Applied to -next
Thanks,
Oded
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 28/30] habanalabs: Add missing annotation for goya_hw_queues_unlock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (26 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 27/30] habanalabs: Add missing annotation for goya_hw_queues_lock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-25 11:56 ` Oded Gabbay
2020-02-23 23:17 ` [PATCH 29/30] sgi-xp: Add missing annotation for xpc_disconnect_channel() Jules Irenge
2020-02-23 23:17 ` [Ocfs2-devel] " Jules Irenge
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Oded Gabbay, Arnd Bergmann,
Greg Kroah-Hartman, Tomer Tayar, Omer Shpigelman, Dalit Ben Zoor
Sparse reports a warning at goya_hw_queues_unlock()
warning: context imbalance in goya_hw_queues_unlock() - unexpected unlock
The root cause is a missing annotation at goya_hw_queues_unlock()
Add the missing __releases(&goya->hw_queues_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/misc/habanalabs/goya/goya.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index 8ca7ee57cbc1..6138b461d0f8 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -5081,6 +5081,7 @@ static void goya_hw_queues_lock(struct hl_device *hdev)
}
static void goya_hw_queues_unlock(struct hl_device *hdev)
+ __releases(&goya->hw_queues_lock)
{
struct goya_device *goya = hdev->asic_specific;
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 28/30] habanalabs: Add missing annotation for goya_hw_queues_unlock()
2020-02-23 23:17 ` [PATCH 28/30] habanalabs: Add missing annotation for goya_hw_queues_unlock() Jules Irenge
@ 2020-02-25 11:56 ` Oded Gabbay
0 siblings, 0 replies; 125+ messages in thread
From: Oded Gabbay @ 2020-02-25 11:56 UTC (permalink / raw)
To: Jules Irenge
Cc: boqun.feng, Linux-Kernel@Vger. Kernel. Org, Arnd Bergmann,
Greg Kroah-Hartman, Tomer Tayar, Omer Shpigelman, Dalit Ben Zoor
On Mon, Feb 24, 2020 at 1:18 AM Jules Irenge <jbi.octave@gmail.com> wrote:
>
> Sparse reports a warning at goya_hw_queues_unlock()
> warning: context imbalance in goya_hw_queues_unlock() - unexpected unlock
> The root cause is a missing annotation at goya_hw_queues_unlock()
> Add the missing __releases(&goya->hw_queues_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
> drivers/misc/habanalabs/goya/goya.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
> index 8ca7ee57cbc1..6138b461d0f8 100644
> --- a/drivers/misc/habanalabs/goya/goya.c
> +++ b/drivers/misc/habanalabs/goya/goya.c
> @@ -5081,6 +5081,7 @@ static void goya_hw_queues_lock(struct hl_device *hdev)
> }
>
> static void goya_hw_queues_unlock(struct hl_device *hdev)
> + __releases(&goya->hw_queues_lock)
> {
> struct goya_device *goya = hdev->asic_specific;
>
> --
> 2.24.1
>
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Applied to -next
Thanks,
Oded
^ permalink raw reply [flat|nested] 125+ messages in thread
* [PATCH 29/30] sgi-xp: Add missing annotation for xpc_disconnect_channel()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
` (27 preceding siblings ...)
2020-02-23 23:17 ` [PATCH 28/30] habanalabs: Add missing annotation for goya_hw_queues_unlock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-28 19:22 ` Robin Holt
2020-02-23 23:17 ` [Ocfs2-devel] " Jules Irenge
29 siblings, 1 reply; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Cliff Whickman, Robin Holt,
Arnd Bergmann, Greg Kroah-Hartman
Sparse reports a warning at xpc_disconnect_channel()
warning: context imbalance in xpc_disconnect_channel() - unexpected unlock
The root cause is a missing annotation at xpc_disconnect_channel()
Add the missing __must_hold(&ch->lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/misc/sgi-xp/xpc_channel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
index 8e6607fc8a67..a1e92488e9bc 100644
--- a/drivers/misc/sgi-xp/xpc_channel.c
+++ b/drivers/misc/sgi-xp/xpc_channel.c
@@ -752,6 +752,7 @@ xpc_initiate_disconnect(int ch_number)
void
xpc_disconnect_channel(const int line, struct xpc_channel *ch,
enum xp_retval reason, unsigned long *irq_flags)
+ __must_hold(&ch->lock)
{
u32 channel_was_connected = (ch->flags & XPC_C_CONNECTED);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock()
2020-02-23 23:16 ` [PATCH 00/30] Lock warning cleanups Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:16 ` Jules Irenge
` (28 subsequent siblings)
29 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Mark Fasheh, Joel Becker, Joseph Qi,
moderated list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
Sparse reports a warning at ocfs2_inode_cache_lock()
and ocfs2_inode_cache_unlock()
warning: context imbalance in ocfs2_inode_cache_lock()
- wrong count at exit
warning: context imbalance in ocfs2_inode_cache_unlock()
- unexpected unlock
The root cause is a missing annotation at ocfs2_inode_cache_lock()
and at ocfs2_inode_cache_unlock()
Add the missing __acquires(&oi->ip_lock) annotation
Add the missing __releases(&oi->ip_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
fs/ocfs2/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 7c9dfd50c1c1..0b87e0a63ab9 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info
}
static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
+ __acquires(&oi->ip_lock)
{
struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
@@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
}
static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci)
+ __releases(&oi->ip_lock)
{
struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* [Ocfs2-devel] [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock()
@ 2020-02-23 23:17 ` Jules Irenge
0 siblings, 0 replies; 125+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Mark Fasheh, Joel Becker, Joseph Qi,
moderated list:ORACLE CLUSTER FILESYSTEM 2 OCFS2
Sparse reports a warning at ocfs2_inode_cache_lock()
and ocfs2_inode_cache_unlock()
warning: context imbalance in ocfs2_inode_cache_lock()
- wrong count at exit
warning: context imbalance in ocfs2_inode_cache_unlock()
- unexpected unlock
The root cause is a missing annotation at ocfs2_inode_cache_lock()
and at ocfs2_inode_cache_unlock()
Add the missing __acquires(&oi->ip_lock) annotation
Add the missing __releases(&oi->ip_lock) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
fs/ocfs2/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 7c9dfd50c1c1..0b87e0a63ab9 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info
}
static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
+ __acquires(&oi->ip_lock)
{
struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
@@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
}
static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci)
+ __releases(&oi->ip_lock)
{
struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
--
2.24.1
^ permalink raw reply related [flat|nested] 125+ messages in thread
* Re: [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock()
2020-02-23 23:17 ` [Ocfs2-devel] " Jules Irenge
@ 2020-02-24 1:52 ` Joseph Qi
-1 siblings, 0 replies; 125+ messages in thread
From: Joseph Qi @ 2020-02-24 1:52 UTC (permalink / raw)
To: Jules Irenge, boqun.feng
Cc: linux-kernel, Mark Fasheh, Joel Becker,
moderated list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2),
Andrew Morton
On 2020/2/24 07:17, Jules Irenge wrote:
> Sparse reports a warning at ocfs2_inode_cache_lock()
> and ocfs2_inode_cache_unlock()
> warning: context imbalance in ocfs2_inode_cache_lock()
> - wrong count at exit
>
> warning: context imbalance in ocfs2_inode_cache_unlock()
> - unexpected unlock
> The root cause is a missing annotation at ocfs2_inode_cache_lock()
> and at ocfs2_inode_cache_unlock()
>
> Add the missing __acquires(&oi->ip_lock) annotation
> Add the missing __releases(&oi->ip_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Looks good.
BTW, there are another co_cache_[lock|unlock] implementations also
miss the annotations:
ocfs2_refcount_cache_lock
ocfs2_refcount_cache_unlock
So could we add the missing annotations as well?
Thanks,
Joseph
> ---
> fs/ocfs2/inode.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index 7c9dfd50c1c1..0b87e0a63ab9 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info
> }
>
> static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> + __acquires(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
> @@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> }
>
> static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci)
> + __releases(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
>
^ permalink raw reply [flat|nested] 125+ messages in thread
* [Ocfs2-devel] [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock()
@ 2020-02-24 1:52 ` Joseph Qi
0 siblings, 0 replies; 125+ messages in thread
From: Joseph Qi @ 2020-02-24 1:52 UTC (permalink / raw)
To: Jules Irenge, boqun.feng
Cc: linux-kernel, Mark Fasheh, Joel Becker,
moderated list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2),
Andrew Morton
On 2020/2/24 07:17, Jules Irenge wrote:
> Sparse reports a warning at ocfs2_inode_cache_lock()
> and ocfs2_inode_cache_unlock()
> warning: context imbalance in ocfs2_inode_cache_lock()
> - wrong count at exit
>
> warning: context imbalance in ocfs2_inode_cache_unlock()
> - unexpected unlock
> The root cause is a missing annotation at ocfs2_inode_cache_lock()
> and at ocfs2_inode_cache_unlock()
>
> Add the missing __acquires(&oi->ip_lock) annotation
> Add the missing __releases(&oi->ip_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Looks good.
BTW, there are another co_cache_[lock|unlock] implementations also
miss the annotations:
ocfs2_refcount_cache_lock
ocfs2_refcount_cache_unlock
So could we add the missing annotations as well?
Thanks,
Joseph
> ---
> fs/ocfs2/inode.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index 7c9dfd50c1c1..0b87e0a63ab9 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info
> }
>
> static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> + __acquires(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
> @@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> }
>
> static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci)
> + __releases(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
>
^ permalink raw reply [flat|nested] 125+ messages in thread
* Re: [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock()
2020-02-23 23:17 ` [Ocfs2-devel] " Jules Irenge
@ 2020-02-25 0:54 ` Joseph Qi
-1 siblings, 0 replies; 125+ messages in thread
From: Joseph Qi @ 2020-02-25 0:54 UTC (permalink / raw)
To: Jules Irenge, boqun.feng
Cc: linux-kernel, Mark Fasheh, Joel Becker,
moderated list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
On 2020/2/24 07:17, Jules Irenge wrote:
> Sparse reports a warning at ocfs2_inode_cache_lock()
> and ocfs2_inode_cache_unlock()
> warning: context imbalance in ocfs2_inode_cache_lock()
> - wrong count at exit
>
> warning: context imbalance in ocfs2_inode_cache_unlock()
> - unexpected unlock
> The root cause is a missing annotation at ocfs2_inode_cache_lock()
> and at ocfs2_inode_cache_unlock()
>
> Add the missing __acquires(&oi->ip_lock) annotation
> Add the missing __releases(&oi->ip_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/inode.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index 7c9dfd50c1c1..0b87e0a63ab9 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info
> }
>
> static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> + __acquires(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
> @@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> }
>
> static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci)
> + __releases(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
>
^ permalink raw reply [flat|nested] 125+ messages in thread
* [Ocfs2-devel] [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock()
@ 2020-02-25 0:54 ` Joseph Qi
0 siblings, 0 replies; 125+ messages in thread
From: Joseph Qi @ 2020-02-25 0:54 UTC (permalink / raw)
To: Jules Irenge, boqun.feng
Cc: linux-kernel, Mark Fasheh, Joel Becker,
moderated list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
On 2020/2/24 07:17, Jules Irenge wrote:
> Sparse reports a warning at ocfs2_inode_cache_lock()
> and ocfs2_inode_cache_unlock()
> warning: context imbalance in ocfs2_inode_cache_lock()
> - wrong count at exit
>
> warning: context imbalance in ocfs2_inode_cache_unlock()
> - unexpected unlock
> The root cause is a missing annotation at ocfs2_inode_cache_lock()
> and at ocfs2_inode_cache_unlock()
>
> Add the missing __acquires(&oi->ip_lock) annotation
> Add the missing __releases(&oi->ip_lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/inode.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index 7c9dfd50c1c1..0b87e0a63ab9 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info
> }
>
> static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> + __acquires(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
> @@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci)
> }
>
> static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci)
> + __releases(&oi->ip_lock)
> {
> struct ocfs2_inode_info *oi = cache_info_to_inode(ci);
>
>
^ permalink raw reply [flat|nested] 125+ messages in thread