Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NETFILTER]: Supress some sparse warnings

CHECK net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_expect.c:429:13: warning: context imbalance in 'exp_seq_start' - wrong count at exit
net/netfilter/nf_conntrack_expect.c:441:13: warning: context imbalance in 'exp_seq_stop' - unexpected unlock
CHECK net/netfilter/nf_log.c
net/netfilter/nf_log.c:105:13: warning: context imbalance in 'seq_start' - wrong count at exit
net/netfilter/nf_log.c:125:13: warning: context imbalance in 'seq_stop' - unexpected unlock
CHECK net/netfilter/nfnetlink_queue.c
net/netfilter/nfnetlink_queue.c:363:7: warning: symbol 'size' shadows an earlier one
net/netfilter/nfnetlink_queue.c:217:9: originally declared here
net/netfilter/nfnetlink_queue.c:847:13: warning: context imbalance in 'seq_start' - wrong count at exit
net/netfilter/nfnetlink_queue.c:859:13: warning: context imbalance in 'seq_stop' - unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
ca7c48ca 3046d767

+8 -2
+2
net/netfilter/nf_conntrack_expect.c
··· 427 427 } 428 428 429 429 static void *exp_seq_start(struct seq_file *seq, loff_t *pos) 430 + __acquires(nf_conntrack_lock) 430 431 { 431 432 read_lock_bh(&nf_conntrack_lock); 432 433 return ct_expect_get_idx(seq, *pos); ··· 440 439 } 441 440 442 441 static void exp_seq_stop(struct seq_file *seq, void *v) 442 + __releases(nf_conntrack_lock) 443 443 { 444 444 read_unlock_bh(&nf_conntrack_lock); 445 445 }
+2
net/netfilter/nf_log.c
··· 103 103 104 104 #ifdef CONFIG_PROC_FS 105 105 static void *seq_start(struct seq_file *seq, loff_t *pos) 106 + __acquires(RCU) 106 107 { 107 108 rcu_read_lock(); 108 109 ··· 124 123 } 125 124 126 125 static void seq_stop(struct seq_file *s, void *v) 126 + __releases(RCU) 127 127 { 128 128 rcu_read_unlock(); 129 129 }