diff options
Diffstat (limited to 'net/packet/diag.c')
-rw-r--r-- | net/packet/diag.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/packet/diag.c b/net/packet/diag.c index 8db6e21c46bd..d3fcd1ebef7e 100644 --- a/net/packet/diag.c +++ b/net/packet/diag.c | |||
@@ -172,13 +172,12 @@ static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
172 | struct packet_diag_req *req; | 172 | struct packet_diag_req *req; |
173 | struct net *net; | 173 | struct net *net; |
174 | struct sock *sk; | 174 | struct sock *sk; |
175 | struct hlist_node *node; | ||
176 | 175 | ||
177 | net = sock_net(skb->sk); | 176 | net = sock_net(skb->sk); |
178 | req = nlmsg_data(cb->nlh); | 177 | req = nlmsg_data(cb->nlh); |
179 | 178 | ||
180 | mutex_lock(&net->packet.sklist_lock); | 179 | mutex_lock(&net->packet.sklist_lock); |
181 | sk_for_each(sk, node, &net->packet.sklist) { | 180 | sk_for_each(sk, &net->packet.sklist) { |
182 | if (!net_eq(sock_net(sk), net)) | 181 | if (!net_eq(sock_net(sk), net)) |
183 | continue; | 182 | continue; |
184 | if (num < s_num) | 183 | if (num < s_num) |