aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2017-01-19 08:25:58 -0500
committerDoug Ledford <dledford@redhat.com>2017-01-24 16:17:25 -0500
commitf39f775218a7520e3700de2003c84a042c3b5972 (patch)
treed11f8e85fb2f550437917e06d2b20a4ed091cf8c
parent828f6fa65ce7e80f77f5ab12942e44eb3d9d174e (diff)
IB/rxe: Fix rxe dev insertion to rxe_dev_list
The first argument of list_add_tail is the new item and the second is the head of the list. Fix the code to pass arguments in the right order, otherwise not all the rxe devices will be removed during teardown. Fixes: 8700e3e7c4857 ('Soft RoCE driver') Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Reviewed-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/sw/rxe/rxe_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 342e78163613..4abdeb359fb4 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -555,7 +555,7 @@ struct rxe_dev *rxe_net_add(struct net_device *ndev)
555 } 555 }
556 556
557 spin_lock_bh(&dev_list_lock); 557 spin_lock_bh(&dev_list_lock);
558 list_add_tail(&rxe_dev_list, &rxe->list); 558 list_add_tail(&rxe->list, &rxe_dev_list);
559 spin_unlock_bh(&dev_list_lock); 559 spin_unlock_bh(&dev_list_lock);
560 return rxe; 560 return rxe;
561} 561}