@@ -1318,11 +1318,11 @@ static int kernel_bindconnect(struct socket *s, struct sockaddr *laddr,
return rv;
}
- rv = s->ops->bind(s, laddr, size);
+ rv = kernel_bind(s, laddr, size);
if (rv < 0)
return rv;
- rv = s->ops->connect(s, raddr, size, flags);
+ rv = kernel_connect(s, raddr, size, flags);
return rv < 0 ? rv : 0;
}
@@ -1788,8 +1788,8 @@ int siw_create_listen(struct iw_cm_id *id, int backlog)
if (ipv4_is_zeronet(laddr->sin_addr.s_addr))
s->sk->sk_bound_dev_if = sdev->netdev->ifindex;
- rv = s->ops->bind(s, (struct sockaddr *)laddr,
- sizeof(struct sockaddr_in));
+ rv = kernel_bind(s, (struct sockaddr *)laddr,
+ sizeof(struct sockaddr_in));
} else {
struct sockaddr_in6 *laddr = &to_sockaddr_in6(id->local_addr);
@@ -1806,8 +1806,8 @@ int siw_create_listen(struct iw_cm_id *id, int backlog)
if (ipv6_addr_any(&laddr->sin6_addr))
s->sk->sk_bound_dev_if = sdev->netdev->ifindex;
- rv = s->ops->bind(s, (struct sockaddr *)laddr,
- sizeof(struct sockaddr_in6));
+ rv = kernel_bind(s, (struct sockaddr *)laddr,
+ sizeof(struct sockaddr_in6));
}
if (rv) {
siw_dbg(id->device, "socket bind error: %d\n", rv);
@@ -1827,7 +1827,7 @@ int siw_create_listen(struct iw_cm_id *id, int backlog)
rv, backlog);
goto error;
}
- rv = s->ops->listen(s, backlog);
+ rv = kernel_listen(s, backlog);
if (rv) {
siw_dbg(id->device, "listen error %d\n", rv);
goto error;
That's nicer than dereferencing socket structures. This prepares making rdma_connect()/siw_connect() non-blocking in order to avoid deadlocks in the callers. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher <metze@samba.org> Cc: Bernard Metzler <bmt@zurich.ibm.com> Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/sw/siw/siw_cm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)