Skip to content

Commit 0b41d6c

Browse files
author
Nicholas Bellinger
committed
ib_srpt: Destroy cm_id before destroying QP.
This patch fixes a bug where ib_destroy_cm_id() was incorrectly being called after srpt_destroy_ch_ib() had destroyed the active QP. This would result in the following failed SRP_LOGIN_REQ messages: Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1762bd, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c903009f8f41) Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1758f9, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c903009f8f42) Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff175941, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c90300a3cfb2) Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1) mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9 rejected SRP_LOGIN_REQ because creating a new RDMA channel failed. Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1) mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9 rejected SRP_LOGIN_REQ because creating a new RDMA channel failed. Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1) Reported-by: Navin Ahuja <[email protected]> Cc: [email protected] # 3.3+ Signed-off-by: Nicholas Bellinger <[email protected]>
1 parent 3e9e01d commit 0b41d6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,8 @@ static void srpt_release_channel_work(struct work_struct *w)
23582358
transport_deregister_session(se_sess);
23592359
ch->sess = NULL;
23602360

2361+
ib_destroy_cm_id(ch->cm_id);
2362+
23612363
srpt_destroy_ch_ib(ch);
23622364

23632365
srpt_free_ioctx_ring((struct srpt_ioctx **)ch->ioctx_ring,
@@ -2368,8 +2370,6 @@ static void srpt_release_channel_work(struct work_struct *w)
23682370
list_del(&ch->list);
23692371
spin_unlock_irq(&sdev->spinlock);
23702372

2371-
ib_destroy_cm_id(ch->cm_id);
2372-
23732373
if (ch->release_done)
23742374
complete(ch->release_done);
23752375

0 commit comments

Comments
 (0)