Skip to content

Commit

Permalink
netfilter: ctnetlink: Add missing annotation for ctnetlink_parse_nat_…
Browse files Browse the repository at this point in the history
…setup()

Sparse reports a warning at ctnetlink_parse_nat_setup()

warning: context imbalance in ctnetlink_parse_nat_setup()
	- unexpected unlock

The root cause is the missing annotation at ctnetlink_parse_nat_setup()
Add the missing __must_hold(RCU) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Jules Irenge authored and Pablo Neira Ayuso committed Mar 27, 2020
1 parent dc264f1 commit 19f8f71
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@ static int
ctnetlink_parse_nat_setup(struct nf_conn *ct,
enum nf_nat_manip_type manip,
const struct nlattr *attr)
__must_hold(RCU)
{
struct nf_nat_hook *nat_hook;
int err;
Expand Down

0 comments on commit 19f8f71

Please sign in to comment.