]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/infiniband/sw/rxe/rxe_qp.c
RDMA/rxe: Fix rxe_qp_cleanup()
[mirror_ubuntu-bionic-kernel.git] / drivers / infiniband / sw / rxe / rxe_qp.c
index 4469592b839d03aed0278051f3ac7cac507cebf5..137d6c0c49d410f1be1259c0f4e088409043498d 100644 (file)
@@ -824,9 +824,9 @@ void rxe_qp_destroy(struct rxe_qp *qp)
 }
 
 /* called when the last reference to the qp is dropped */
-void rxe_qp_cleanup(struct rxe_pool_entry *arg)
+static void rxe_qp_do_cleanup(struct work_struct *work)
 {
-       struct rxe_qp *qp = container_of(arg, typeof(*qp), pelem);
+       struct rxe_qp *qp = container_of(work, typeof(*qp), cleanup_work.work);
 
        rxe_drop_all_mcast_groups(qp);
 
@@ -859,3 +859,11 @@ void rxe_qp_cleanup(struct rxe_pool_entry *arg)
        kernel_sock_shutdown(qp->sk, SHUT_RDWR);
        sock_release(qp->sk);
 }
+
+/* called when the last reference to the qp is dropped */
+void rxe_qp_cleanup(struct rxe_pool_entry *arg)
+{
+       struct rxe_qp *qp = container_of(arg, typeof(*qp), pelem);
+
+       execute_in_process_context(rxe_qp_do_cleanup, &qp->cleanup_work);
+}