]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Bugfix for posting a wqe with sge
authorLijun Ou <oulijun@huawei.com>
Thu, 9 Jan 2020 12:10:52 +0000 (20:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:22 +0000 (16:45 +0100)
commit25bda0cba6f8c2db5e4bb0d117300ef4a84058b4
tree57e9908f4b1880e1de14b9f12cb57b6810130e7c
parente29cdb27c608eab37bec74860a6266252cdb18e5
RDMA/hns: Bugfix for posting a wqe with sge

commit 468d020e2f02867b8ec561461a1689cd4365e493 upstream.

Driver should first check whether the sge is valid, then fill the valid
sge and the caculated total into hardware, otherwise invalid sges will
cause an error.

Fixes: 52e3b42a2f58 ("RDMA/hns: Filter for zero length of sge in hip08 kernel mode")
Fixes: 7bdee4158b37 ("RDMA/hns: Fill sq wqe context of ud type in hip08")
Link: https://lore.kernel.org/r/1578571852-13704-1-git-send-email-liweihang@huawei.com
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c