Skip to content

Commit

Permalink
IB/rxe: Fix rxe dev insertion to rxe_dev_list
Browse files Browse the repository at this point in the history
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: 8700e3e ('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>
  • Loading branch information
Maor Gottlieb authored and Doug Ledford committed Jan 24, 2017
1 parent 828f6fa commit f39f775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rxe/rxe_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ struct rxe_dev *rxe_net_add(struct net_device *ndev)
}

spin_lock_bh(&dev_list_lock);
list_add_tail(&rxe_dev_list, &rxe->list);
list_add_tail(&rxe->list, &rxe_dev_list);
spin_unlock_bh(&dev_list_lock);
return rxe;
}
Expand Down

0 comments on commit f39f775

Please sign in to comment.