From: Eric Dumazet Date: Tue, 8 Jan 2008 06:39:57 +0000 (-0800) Subject: [PACKET]: Fix sparse warnings in af_packet.c X-Git-Tag: v2.6.25-rc1~1162^2~860 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40ccbf525e55fc6d1f3a88c1e98b13db4dd618db;p=linux-2.6 [PACKET]: Fix sparse warnings in af_packet.c 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 Signed-off-by: David S. Miller --- diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 43e49f46ad..b8b827c706 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);