Skip to content

Commit ae8f58a

Browse files
GoKu-Gear6jfvogel
authored andcommitted
net/rds: start rdma listening after ib/iw initialization is done
This prevents RDS from handling incoming rdma packets before RDS completes initializing its recv/send components. We don't need to call rds_rdma_listen_stop() if rds_rdma_listen_init() didn't succeed. We only need to call rds_ib_exit() if rds_ib_init() succeeds but other parts fail. The same applies to rds_iw_init()/rds_iw_exit(). So we need to change error handling sequence accordingly. Jump to ib/iw error handling path when we get an err code from rds_rdma_listen_init(). Orabug: 21684447 Signed-off-by: Qing Huang <[email protected]> Signed-off-by: Mukesh Kacker <[email protected]> Reviewed-by: Ajaykumar Hotchandani <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Orabug: 27364391 (cherry picked from commit 6d02e51) cherry-pick-repo=linux-uek.git Conflicts: net/rds/rdma_transport.c Signed-off-by: Gerd Rausch <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]> Orabug: 33590097 UEK6 => UEK7 (cherry picked from commit cc2ca09) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]>
1 parent ff5dcbd commit ae8f58a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

net/rds/rdma_transport.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,13 @@ int rds_rdma_init(void)
443443
{
444444
int ret;
445445

446-
ret = rds_rdma_listen_init();
446+
ret = rds_ib_init();
447447
if (ret)
448448
goto out;
449449

450-
ret = rds_ib_init();
450+
ret = rds_rdma_listen_init();
451451
if (ret)
452-
goto err_ib_init;
452+
goto err_rdma_listen_init;
453453

454454
if (!unload_allowed) {
455455
printk(KERN_NOTICE "Module %s locked in memory until next boot\n",
@@ -459,9 +459,13 @@ int rds_rdma_init(void)
459459

460460
goto out;
461461

462-
err_ib_init:
463-
rds_rdma_listen_stop();
462+
err_rdma_listen_init:
463+
/* We need to clean up both ib and iw components. */
464+
rds_ib_exit();
464465
out:
466+
/* Either nothing is done successfully or everything succeeds at
467+
* this point.
468+
*/
465469
return ret;
466470
}
467471
module_init(rds_rdma_init);

0 commit comments

Comments
 (0)