From: Maor Gottlieb Date: Thu, 19 Jan 2017 13:25:58 +0000 (+0200) Subject: IB/rxe: Fix rxe dev insertion to rxe_dev_list X-Git-Tag: v4.9.7~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fed1e89a16e3684e1bd218e1d6a78f83b5ceb865;p=platform%2Fkernel%2Flinux-amlogic.git IB/rxe: Fix rxe dev insertion to rxe_dev_list commit f39f775218a7520e3700de2003c84a042c3b5972 upstream. 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 Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index ffff5a54cb34..f4f3942ebbd1 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -554,7 +554,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; }