lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 9 Sep 2016 18:30:43 +0800
From:   Salil Mehta <salil.mehta@...wei.com>
To:     <dledford@...hat.com>
CC:     <salil.mehta@...wei.com>, <xavier.huwei@...wei.com>,
        <oulijun@...wei.com>, <yisen.zhuang@...wei.com>,
        <xuwei5@...ilicon.com>, <mehta.salil.lnk@...il.com>,
        <linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>,
        "Dongdong Huang(Donald)" <hdd.huang@...wei.com>
Subject: [PATCH for-next 12/20] IB/hns: Return bad wr while post send failed

From: Lijun Ou <oulijun@...wei.com>

While post failed, hns roce should return the wr failed to user.
We omitted this while qp type is wrong and fixed it.

Signed-off-by: Lijun Ou <oulijun@...wei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@...wei.com>
Reviewed-by:  Wei Hu (Xavier) <xavier.huwei@...wei.com>
Signed-off-by: Salil Mehta <salil.mehta@...wei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index f4d2515..f0d6315 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -264,8 +264,10 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 			}
 			ind++;
 		} else {
-			dev_dbg(dev, "unSupported QP type\n");
-			break;
+			dev_err(dev, "unSupported QP type\n");
+			ret = -EOPNOTSUPP;
+			*bad_wr = wr;
+			goto out;
 		}
 	}
 
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ