Skip to content

Commit

Permalink
[PACKET]: Fix sparse warnings in af_packet.c
Browse files Browse the repository at this point in the history
  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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 28, 2008
1 parent 67b2321 commit 40ccbf5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 40ccbf5

Please sign in to comment.