From 97863882b2c9567af0eded3100c985683c66bb0c Mon Sep 17 00:00:00 2001 From: Amir Vadai Date: Tue, 17 Feb 2009 11:04:09 +0200 Subject: [PATCH] sdp: BUG1502 - scheduling while atomic Don't destory qp from interrupt context - do it in work queue Signed-off-by: Amir Vadai --- drivers/infiniband/ulp/sdp/sdp.h | 9 +++++---- drivers/infiniband/ulp/sdp/sdp_main.c | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h index d9da77679a50..aeeb1bb7ea3f 100644 --- a/drivers/infiniband/ulp/sdp/sdp.h +++ b/drivers/infiniband/ulp/sdp/sdp.h @@ -173,16 +173,18 @@ struct sdp_sock { int destructed_already; int sdp_disconnect; - /* Data below will be reset on error */ + struct sdp_buf *rx_ring; + struct sdp_buf *tx_ring; + /* rdma specific */ - struct rdma_cm_id *id; struct ib_qp *qp; struct ib_cq *cq; struct ib_mr *mr; + /* Data below will be reset on error */ + struct rdma_cm_id *id; struct ib_device *ib_device; /* SDP specific */ - struct sdp_buf *rx_ring; struct ib_recv_wr rx_wr; unsigned rx_head; unsigned rx_tail; @@ -194,7 +196,6 @@ struct sdp_sock { int remote_credits; int poll_cq; - struct sdp_buf *tx_ring; unsigned tx_head; unsigned tx_tail; struct ib_send_wr tx_wr; diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index e20a79c00df7..ebd716ac531e 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -344,8 +344,6 @@ void sdp_reset_sk(struct sock *sk, int rc) if (!(sk->sk_shutdown & RCV_SHUTDOWN) || !sk_stream_memory_free(sk)) sdp_set_error(sk, rc); - sdp_destroy_qp(ssk); - memset((void *)&ssk->id, 0, sizeof(*ssk) - offsetof(typeof(*ssk), id)); sk->sk_state_change(sk); -- 2.50.1