diff options
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 3 | ||||
-rw-r--r-- | net/packet/diag.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index c7bfeff10767..1d6793dbfbae 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -3263,12 +3263,11 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, | |||
3263 | static int packet_notifier(struct notifier_block *this, unsigned long msg, void *data) | 3263 | static int packet_notifier(struct notifier_block *this, unsigned long msg, void *data) |
3264 | { | 3264 | { |
3265 | struct sock *sk; | 3265 | struct sock *sk; |
3266 | struct hlist_node *node; | ||
3267 | struct net_device *dev = data; | 3266 | struct net_device *dev = data; |
3268 | struct net *net = dev_net(dev); | 3267 | struct net *net = dev_net(dev); |
3269 | 3268 | ||
3270 | rcu_read_lock(); | 3269 | rcu_read_lock(); |
3271 | sk_for_each_rcu(sk, node, &net->packet.sklist) { | 3270 | sk_for_each_rcu(sk, &net->packet.sklist) { |
3272 | struct packet_sock *po = pkt_sk(sk); | 3271 | struct packet_sock *po = pkt_sk(sk); |
3273 | 3272 | ||
3274 | switch (msg) { | 3273 | switch (msg) { |
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) |