From patchwork Fri Oct 28 16:33:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9402301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C8B36022E for ; Fri, 28 Oct 2016 16:33:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F39C02A8A9 for ; Fri, 28 Oct 2016 16:33:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E72732A8AF; Fri, 28 Oct 2016 16:33:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 313952A8A9 for ; Fri, 28 Oct 2016 16:33:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937878AbcJ1Qde (ORCPT ); Fri, 28 Oct 2016 12:33:34 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35238 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937846AbcJ1Qde (ORCPT ); Fri, 28 Oct 2016 12:33:34 -0400 Received: by mail-pf0-f195.google.com with SMTP id s8so1679031pfj.2 for ; Fri, 28 Oct 2016 09:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zLd4bV3G+M2W97m6rCAsQl9sGKcd8iyiLv5t0a3fqT8=; b=Ts6DESe51m787+OLjWLGFooOGjeHxrrFRC+9aTEO0pcrRVJ5nJ8wr4atRMO+VT9Nwy KRmVddKTOkKbYx2dn5xsQEgSs1euE/FcMkSYl+R0CbI06K71Tl/23N7PMZn/MM5z2J6K sa4Q3GeAq1DPzhbAWv9x8y5d/fg9n9IBxgOIMEOMs+da528fts8DfdDIO1JVVx2MTUrw q2Vsqn+QKBGOD4U1FxJxi6vPfP6iTbbRD8dlJ+iRtu/jHGTvpRKl/TvPqOl17ULmCgIZ L7RCb6CJeiq8WdZH4y8u/ez0zIEafupQBDcOqS9+RT/dIaxBfPECFKWvkhwHY75ZCkvL q9YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zLd4bV3G+M2W97m6rCAsQl9sGKcd8iyiLv5t0a3fqT8=; b=ajQgXxN9/YVBVEtBvvqREYEh/B1HKw0BaqbPcxUduKXHitk+0ujI3AZcZasx8GkIva qiI6dV8QQM2Xvwyk5+NP8FT/h/l1dqx0otKVocpEL3NJDNoV3HE/uK8SFswvlhXqGdXN PorZqU/KBh+mBZiVCilkQMoe+MJfkli8OzsNQpETjlgA3l9BRENHE2yqGcMHa8Bv/uJl vRezGVA1mtfi9Dx1wcoEpu+YuEsQG8Y4gmPZBra6Ks8mJx5PUzo8Xx8b7gjtuk9LG/CS /uNfiTY2ttK0lIVnKUkrjSAAhtvTjmOrfbRliao+h3V5kj/mHVJgseCZFcIsr65wkQvg MZfQ== X-Gm-Message-State: ABUngvfhLiUfHJZ3igDtPeVnwaU0Eb79cZrvAHOSckHMPb8YoEdiFQE3uRPGIehv+UP0uQ== X-Received: by 10.99.140.81 with SMTP id q17mr10771136pgn.174.1477672413433; Fri, 28 Oct 2016 09:33:33 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id o185sm12965543pfb.24.2016.10.28.09.33.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2016 09:33:33 -0700 (PDT) From: Wei Yongjun To: Doug Ledford , Sean Hefty , Hal Rosenstock , Ram Amrani , Rajesh Borundia Cc: Wei Yongjun , linux-rdma@vger.kernel.org Subject: [PATCH] qedr: Fix missing unlock on error in qedr_post_send() Date: Fri, 28 Oct 2016 16:33:26 +0000 Message-Id: <1477672406-31487-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Add the missing unlock before return from function qedr_post_send() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/infiniband/hw/qedr/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index a615142..e7c7417 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -2983,7 +2983,8 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, if (!wr) { DP_ERR(dev, "Got an empty post send.\n"); - return -EINVAL; + rc = -EINVAL; + goto out_unlock; } while (wr) { @@ -3012,6 +3013,7 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, /* Make sure write sticks */ mmiowb(); +out_unlock: spin_unlock_irqrestore(&qp->q_lock, flags); return rc;