Commit 6b36d482 authored by Jules Irenge's avatar Jules Irenge Committed by Pablo Neira Ayuso

netfilter: conntrack: Add missing annotations for nf_conntrack_all_lock() and...

netfilter: conntrack: Add missing annotations for nf_conntrack_all_lock() and nf_conntrack_all_unlock()

Sparse reports warnings at nf_conntrack_all_lock()
	and nf_conntrack_all_unlock()

warning: context imbalance in nf_conntrack_all_lock()
	- wrong count at exit
warning: context imbalance in nf_conntrack_all_unlock()
	- unexpected unlock

Add the missing __acquires(&nf_conntrack_locks_all_lock)
Add missing __releases(&nf_conntrack_locks_all_lock)
Signed-off-by: default avatarJules Irenge <jbi.octave@gmail.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 19f8f717
...@@ -143,6 +143,7 @@ static bool nf_conntrack_double_lock(struct net *net, unsigned int h1, ...@@ -143,6 +143,7 @@ static bool nf_conntrack_double_lock(struct net *net, unsigned int h1,
} }
static void nf_conntrack_all_lock(void) static void nf_conntrack_all_lock(void)
__acquires(&nf_conntrack_locks_all_lock)
{ {
int i; int i;
...@@ -162,6 +163,7 @@ static void nf_conntrack_all_lock(void) ...@@ -162,6 +163,7 @@ static void nf_conntrack_all_lock(void)
} }
static void nf_conntrack_all_unlock(void) static void nf_conntrack_all_unlock(void)
__releases(&nf_conntrack_locks_all_lock)
{ {
/* All prior stores must be complete before we clear /* All prior stores must be complete before we clear
* 'nf_conntrack_locks_all'. Otherwise nf_conntrack_lock() * 'nf_conntrack_locks_all'. Otherwise nf_conntrack_lock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment