aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-10-28 16:36:29 -0300
committerJason Gunthorpe <jgg@mellanox.com>2019-10-28 16:36:29 -0300
commit036313316d3a38bfde9ba49b3d00f73b7d8019d2 (patch)
tree284127b68e10bd919adb420a5f37dc19d06532f6 /drivers/infiniband/sw
parentRDMA/vmw_pvrdma: Use resource ids from physical device if available (diff)
parentLinux 5.4-rc5 (diff)
downloadlinux-dev-036313316d3a38bfde9ba49b3d00f73b7d8019d2.tar.xz
linux-dev-036313316d3a38bfde9ba49b3d00f73b7d8019d2.zip
Merge tag 'v5.4-rc5' into rdma.git for-next
Linux 5.4-rc5 For dependencies in the next patches Conflict resolved by keeping the delete of the unlock. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/siw/siw_qp.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/infiniband/sw/siw/siw_qp.c b/drivers/infiniband/sw/siw/siw_qp.c
index 430314c8abd9..52d402f39df9 100644
--- a/drivers/infiniband/sw/siw/siw_qp.c
+++ b/drivers/infiniband/sw/siw/siw_qp.c
@@ -182,12 +182,19 @@ void siw_qp_llp_close(struct siw_qp *qp)
*/
void siw_qp_llp_write_space(struct sock *sk)
{
- struct siw_cep *cep = sk_to_cep(sk);
+ struct siw_cep *cep;
- cep->sk_write_space(sk);
+ read_lock(&sk->sk_callback_lock);
+
+ cep = sk_to_cep(sk);
+ if (cep) {
+ cep->sk_write_space(sk);
- if (!test_bit(SOCK_NOSPACE, &sk->sk_socket->flags))
- (void)siw_sq_start(cep->qp);
+ if (!test_bit(SOCK_NOSPACE, &sk->sk_socket->flags))
+ (void)siw_sq_start(cep->qp);
+ }
+
+ read_unlock(&sk->sk_callback_lock);
}
static int siw_qp_readq_init(struct siw_qp *qp, int irq_size, int orq_size)