aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 1d16d95dfaaf..36f75d873898 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -228,7 +228,7 @@ static inline struct sock *netlink_lookup(struct net *net, int protocol,
228 read_lock(&nl_table_lock); 228 read_lock(&nl_table_lock);
229 head = nl_pid_hashfn(hash, pid); 229 head = nl_pid_hashfn(hash, pid);
230 sk_for_each(sk, node, head) { 230 sk_for_each(sk, node, head) {
231 if (sock_net(sk) == net && (nlk_sk(sk)->pid == pid)) { 231 if (net_eq(sock_net(sk), net) && (nlk_sk(sk)->pid == pid)) {
232 sock_hold(sk); 232 sock_hold(sk);
233 goto found; 233 goto found;
234 } 234 }
@@ -348,7 +348,7 @@ static int netlink_insert(struct sock *sk, struct net *net, u32 pid)
348 head = nl_pid_hashfn(hash, pid); 348 head = nl_pid_hashfn(hash, pid);
349 len = 0; 349 len = 0;
350 sk_for_each(osk, node, head) { 350 sk_for_each(osk, node, head) {
351 if (sock_net(osk) == net && (nlk_sk(osk)->pid == pid)) 351 if (net_eq(sock_net(osk), net) && (nlk_sk(osk)->pid == pid))
352 break; 352 break;
353 len++; 353 len++;
354 } 354 }
@@ -532,7 +532,7 @@ retry:
532 netlink_table_grab(); 532 netlink_table_grab();
533 head = nl_pid_hashfn(hash, pid); 533 head = nl_pid_hashfn(hash, pid);
534 sk_for_each(osk, node, head) { 534 sk_for_each(osk, node, head) {
535 if (sock_net(osk) != net) 535 if (!net_eq(sock_net(osk), net))
536 continue; 536 continue;
537 if (nlk_sk(osk)->pid == pid) { 537 if (nlk_sk(osk)->pid == pid) {
538 /* Bind collision, search negative pid values. */ 538 /* Bind collision, search negative pid values. */
@@ -962,7 +962,7 @@ static inline int do_one_broadcast(struct sock *sk,
962 !test_bit(p->group - 1, nlk->groups)) 962 !test_bit(p->group - 1, nlk->groups))
963 goto out; 963 goto out;
964 964
965 if (sock_net(sk) != p->net) 965 if (!net_eq(sock_net(sk), p->net))
966 goto out; 966 goto out;
967 967
968 if (p->failure) { 968 if (p->failure) {