aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-01-31 06:53:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-31 22:27:27 -0500
commitca7c48ca97e5e1d9dbc26cef165814f96d38d96b (patch)
treea198bb7fb5c46f92d73ce35bcd0f89470ea5d5fb
parent3046d76746311ac7ff0cdc3ec42db15730528dbf (diff)
[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>
-rw-r--r--net/netfilter/nf_conntrack_expect.c2
-rw-r--r--net/netfilter/nf_log.c2
-rw-r--r--net/netfilter/nfnetlink_queue.c6
3 files changed, 8 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index e0cd9d00aa61..e405079e5a49 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -427,6 +427,7 @@ static struct hlist_node *ct_expect_get_idx(struct seq_file *seq, loff_t pos)
427} 427}
428 428
429static void *exp_seq_start(struct seq_file *seq, loff_t *pos) 429static void *exp_seq_start(struct seq_file *seq, loff_t *pos)
430 __acquires(nf_conntrack_lock)
430{ 431{
431 read_lock_bh(&nf_conntrack_lock); 432 read_lock_bh(&nf_conntrack_lock);
432 return ct_expect_get_idx(seq, *pos); 433 return ct_expect_get_idx(seq, *pos);
@@ -439,6 +440,7 @@ static void *exp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
439} 440}
440 441
441static void exp_seq_stop(struct seq_file *seq, void *v) 442static void exp_seq_stop(struct seq_file *seq, void *v)
443 __releases(nf_conntrack_lock)
442{ 444{
443 read_unlock_bh(&nf_conntrack_lock); 445 read_unlock_bh(&nf_conntrack_lock);
444} 446}
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 4f5f2885fcac..cec9976aecbf 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -103,6 +103,7 @@ EXPORT_SYMBOL(nf_log_packet);
103 103
104#ifdef CONFIG_PROC_FS 104#ifdef CONFIG_PROC_FS
105static void *seq_start(struct seq_file *seq, loff_t *pos) 105static void *seq_start(struct seq_file *seq, loff_t *pos)
106 __acquires(RCU)
106{ 107{
107 rcu_read_lock(); 108 rcu_read_lock();
108 109
@@ -123,6 +124,7 @@ static void *seq_next(struct seq_file *s, void *v, loff_t *pos)
123} 124}
124 125
125static void seq_stop(struct seq_file *s, void *v) 126static void seq_stop(struct seq_file *s, void *v)
127 __releases(RCU)
126{ 128{
127 rcu_read_unlock(); 129 rcu_read_unlock();
128} 130}
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 51476f82bb54..a48b20fe9cd6 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -360,7 +360,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
360 360
361 if (data_len) { 361 if (data_len) {
362 struct nlattr *nla; 362 struct nlattr *nla;
363 int size = nla_attr_size(data_len); 363 int sz = nla_attr_size(data_len);
364 364
365 if (skb_tailroom(skb) < nla_total_size(data_len)) { 365 if (skb_tailroom(skb) < nla_total_size(data_len)) {
366 printk(KERN_WARNING "nf_queue: no tailroom!\n"); 366 printk(KERN_WARNING "nf_queue: no tailroom!\n");
@@ -369,7 +369,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
369 369
370 nla = (struct nlattr *)skb_put(skb, nla_total_size(data_len)); 370 nla = (struct nlattr *)skb_put(skb, nla_total_size(data_len));
371 nla->nla_type = NFQA_PAYLOAD; 371 nla->nla_type = NFQA_PAYLOAD;
372 nla->nla_len = size; 372 nla->nla_len = sz;
373 373
374 if (skb_copy_bits(entskb, 0, nla_data(nla), data_len)) 374 if (skb_copy_bits(entskb, 0, nla_data(nla), data_len))
375 BUG(); 375 BUG();
@@ -845,6 +845,7 @@ static struct hlist_node *get_idx(struct seq_file *seq, loff_t pos)
845} 845}
846 846
847static void *seq_start(struct seq_file *seq, loff_t *pos) 847static void *seq_start(struct seq_file *seq, loff_t *pos)
848 __acquires(instances_lock)
848{ 849{
849 spin_lock(&instances_lock); 850 spin_lock(&instances_lock);
850 return get_idx(seq, *pos); 851 return get_idx(seq, *pos);
@@ -857,6 +858,7 @@ static void *seq_next(struct seq_file *s, void *v, loff_t *pos)
857} 858}
858 859
859static void seq_stop(struct seq_file *s, void *v) 860static void seq_stop(struct seq_file *s, void *v)
861 __releases(instances_lock)
860{ 862{
861 spin_unlock(&instances_lock); 863 spin_unlock(&instances_lock);
862} 864}