* [PACKET]: Fix sparse warnings in af_packet.c
@ 2008-01-07 11:01 Eric Dumazet
2008-01-08 6:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2008-01-07 11:01 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org
CHECK net/packet/af_packet.c
net/packet/af_packet.c:1876:14: warning: context imbalance in 'packet_seq_start' - wrong count at exit
net/packet/af_packet.c:1888:13: warning: context imbalance in 'packet_seq_stop' - unexpected unlock
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 43e49f4..b8b827c 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1870,6 +1870,7 @@ static inline struct sock *packet_seq_idx(struct net *net, loff_t off)
}
static void *packet_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(seq_file_net(seq)->packet.sklist_lock)
{
struct net *net = seq_file_net(seq);
read_lock(&net->packet.sklist_lock);
@@ -1886,6 +1887,7 @@ static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void packet_seq_stop(struct seq_file *seq, void *v)
+ __releases(seq_file_net(seq)->packet.sklist_lock)
{
struct net *net = seq_file_net(seq);
read_unlock(&net->packet.sklist_lock);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-08 6:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07 11:01 [PACKET]: Fix sparse warnings in af_packet.c Eric Dumazet
2008-01-08 6:40 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox