aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/addr.c4
-rw-r--r--drivers/infiniband/core/cma.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 0802b79c552d..963177e1c9de 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -110,7 +110,7 @@ int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr)
110 __be32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr; 110 __be32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr;
111 int ret; 111 int ret;
112 112
113 dev = ip_dev_find(ip); 113 dev = ip_dev_find(&init_net, ip);
114 if (!dev) 114 if (!dev)
115 return -EADDRNOTAVAIL; 115 return -EADDRNOTAVAIL;
116 116
@@ -261,7 +261,7 @@ static int addr_resolve_local(struct sockaddr_in *src_in,
261 __be32 dst_ip = dst_in->sin_addr.s_addr; 261 __be32 dst_ip = dst_in->sin_addr.s_addr;
262 int ret; 262 int ret;
263 263
264 dev = ip_dev_find(dst_ip); 264 dev = ip_dev_find(&init_net, dst_ip);
265 if (!dev) 265 if (!dev)
266 return -EADDRNOTAVAIL; 266 return -EADDRNOTAVAIL;
267 267
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 15b7e9fb615a..1eff1b2c0e08 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1289,7 +1289,7 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
1289 atomic_inc(&conn_id->dev_remove); 1289 atomic_inc(&conn_id->dev_remove);
1290 conn_id->state = CMA_CONNECT; 1290 conn_id->state = CMA_CONNECT;
1291 1291
1292 dev = ip_dev_find(iw_event->local_addr.sin_addr.s_addr); 1292 dev = ip_dev_find(&init_net, iw_event->local_addr.sin_addr.s_addr);
1293 if (!dev) { 1293 if (!dev) {
1294 ret = -EADDRNOTAVAIL; 1294 ret = -EADDRNOTAVAIL;
1295 cma_enable_remove(conn_id); 1295 cma_enable_remove(conn_id);