]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: Properly return the error code of rdma_set_src_addr_rcu
authorYueHaibing <yuehaibing@huawei.com>
Wed, 19 Sep 2018 12:28:38 +0000 (20:28 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 19 Sep 2018 16:12:44 +0000 (10:12 -0600)
commit1cd25e342c505aea8b744f5e31ed7454fcfd9112
treed2b45ba1edf001b7b93aae312d60bf0b1098d109
parent276b7ea4b8c5307fba61f8bebdf8f36d83a44603
RDMA/core: Properly return the error code of rdma_set_src_addr_rcu

rdma_set_src_addr_rcu should check copy_src_l2_addr fails, rather than
always return 0. Also copy_src_l2_addr should return 'ret' as its return
value when rdma_translate_ip fails.

Fixes: f657d601381c ("RDMA/core: Protect against changing dst->dev during destination resolve")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/addr.c