From patchwork Mon Nov 14 16:44:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9427997 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 6DBCC60471 for ; Mon, 14 Nov 2016 16:44:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62DB128A56 for ; Mon, 14 Nov 2016 16:44:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 576D428A5A; Mon, 14 Nov 2016 16:44:32 +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_SIGNED, 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 A67E528A56 for ; Mon, 14 Nov 2016 16:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932260AbcKNQoY (ORCPT ); Mon, 14 Nov 2016 11:44:24 -0500 Received: from mail-sn1nam02on0054.outbound.protection.outlook.com ([104.47.36.54]:27088 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754399AbcKNQoU (ORCPT ); Mon, 14 Nov 2016 11:44:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=T1f0Jpf+33F7hclJW9EVki0eO9FdFIUbvPqox2GoM64=; b=keMd0KHU/+QlrKXuwowKm2yA+g3icxirXCJIXRangLuaM17M/cIGjwP35uwfWF5YxRG4Tix+vE214BFSgZaGMrJ/+hJQdSuvPdjVMf4K7iFmqEUSDOyocaDRYydRLW4BUQ0upVvYndHZooTQnz3qAzELEaz0Buj7J5V2GWewN/Y= Received: from BN6PR02CA0031.namprd02.prod.outlook.com (10.173.146.145) by BN6PR02MB2852.namprd02.prod.outlook.com (10.175.96.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Mon, 14 Nov 2016 16:44:17 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::116) by BN6PR02CA0031.outlook.office365.com (2603:10b6:404:5f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Mon, 14 Nov 2016 16:44:17 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.5 via Frontend Transport; Mon, 14 Nov 2016 16:44:17 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:2732; Count:17 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id CD.8F.02899.ED7E9285; Mon, 14 Nov 2016 08:35:45 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Mon, 14 Nov 2016 08:44:13 -0800 X-AuditID: 0ac94369-607ff70000000b53-77-5829e7ddc23a Received: from exp-402881.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id E0.49.03661.BD9E9285; Mon, 14 Nov 2016 08:44:13 -0800 (PST) To: Doug Ledford CC: Yishai Hadas , "linux-rdma@vger.kernel.org" From: Bart Van Assche Subject: [PATCH] IB/mlx4: Rework special QP creation error path Message-ID: <3a41daa7-cfb8-7374-5dab-dfa3b1bf83ff@sandisk.com> Date: Mon, 14 Nov 2016 08:44:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRmVeSWpSXmKPExsXCddJ5ke7D55oRBpcn8Vq8PP+B1eLZoV4W iwmXetgcmD2eTT/M5PF+31U2j8+b5AKYo7hsUlJzMstSi/TtErgyfhyPL5jEWbH28XfWBsaT 7F2MnBwSAiYSCw82M3UxcnEICSxlkvh97yIrhLODUeL82g2MMFV/Fq8Ds4UEFjNKtP4QA7FF BNQkNr1aBDaJWSBF4tm5TiYQm03ASOLb+5ksILawgL3EmifPwWp4Bewk2m62gdWwCKhKbL6/ kRnEFhWIkNj0dQ4LRI2gxMmZT4BsDqCZmhLrd+lDjJeX2P52DjPIbRIC/1gk3s5uZYe4R13i 5JL5TBMYBWchaZ+F0D4LSfsCRuZVjGK5mTnFuempBYamesWJeSmZxdl6yfm5mxghAZy5g/Hu E+9DjAIcjEo8vAmHNSOEWBPLiitzDzFKcDArifA+egoU4k1JrKxKLcqPLyrNSS0+xCjNwaIk zut270uYkEB6YklqdmpqQWoRTJaJg1OqgdFLq1tuyvKJUhVOe33sl5yZ68NSkaPXfled5/3j OWnnfJ6JlE7bbrl49/e7lreUs1Pe/1W8z5OzTu9tcvYn22X+8X/uba1lZDvT8o/B7Ef8g0We izSnrq896Ly22vreq9YaPvnutMgzF76w9ubN0p67MPB2DNvvUq+LfEsu3jubfyNm19eldneV WIozEg21mIuKEwGwNJXMXAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIJMWRmVeSWpSXmKPExsXCtZGTTffuS80Ig7bJfBYvz39gtXh2qJfF YsKlHjYHZo9n0w8zebzfd5XN4/MmuQDmKC6blNSczLLUIn27BK6MH8fjCyZxVqx9/J21gfEk excjJ4eEgInEn8XrGLsYuTiEBBYySqw5tpoZJCEioCax6dUisCJmgRSJ+fN2gMXZBIwkvr2f yQJiCwvYS6x58hyshlfATqLtZhsTiM0ioCqx+f5GsHpRgQiJTV/nsEDUCEqcnPmEBWKmusSf eZeYIWx5ie1v5zBPYOSZhaRsFpKyWUjKFjAyr2IUy83MKc5NzywwNNIrTsxLySzO1kvOz93E CAmkqB2M1yeaH2Jk4uCUamBkU7P6toS5+aM548KfB5XSDzQdrwnbucx+75oqM6ElrzlyFlet nCt8yFLs+6q8mz947tpMLPC9Uxt65OHJCo1+JuNfinUO6f/nmnuFJAjHmJSndz6TPcfQEn9x 5qnO6qyPfgLKn4/UrN1n5tm7++7jYhauiot/us3XOXbvXS1um+n/WSzptLUSS3FGoqEWc1Fx IgAipz7+1AEAAA== X-IncomingHeaderCount: 17 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(336003)(189002)(199003)(8676002)(626004)(50986999)(81156014)(81166006)(54356999)(69596002)(92566002)(97736004)(106466001)(4001350100001)(53416004)(31686004)(189998001)(110136003)(65826007)(6916009)(2270400002)(36756003)(5660300001)(87936001)(77096005)(68736007)(33646002)(7846002)(64126003)(50466002)(83506001)(65806001)(586003)(86362001)(23676002)(47776003)(65956001)(2906002)(230700001)(4326007)(305945005)(8936002)(31696002)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR02MB2852; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:qew96trvJ4v9CwvWsM+euycOxt+KJK0uyDtHPpOQ/xMwlyGkvdBpPWSSLDJdVjNXt0SUWNp/GeILo/WM8XWvfC9icCxCY/Q0r+8M3iCMOHOwWVYrFkxsW7Pmi0su6bhmmSQIlwBHoleqaqYtbM6dWMBtLTBHB/G7zCZhlmRUsrt2QKXRI19epEYx1mp4Q045oZIuLy8S36Ss2xU+wqZwXXiZbkBTBk1cybQjx+OgpsuLhjImuxJSBXSDDHIgvo+jFhmOqCSuJhCPL9HxVeA9T0EcsqO3gxnzwfsaJ0oiTZgvQbGqkdw1mczLQtL2kGV0ATmRxHWS/O4zUcxMIJcWKeZD0vx5PJM1JtWnfMLKwrmhCHEqaXAM30OQFrSiImI2T9pmvTQV9vqkPqtTeszHkXECflqMPZlnesIYAEetVdM7RQjH5DNG33JuVSNp7nQ0i5KQah0aySg1T+pPEUBqsYCl8Fl4ctzdxRUkUrsabFNUiaCgZ1fNTYlKKYT5CZpihOWBcMHaYnGVgkGktx1aOw== X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2852; 2:UY1bDYlBCeN2gOvmsakt3dkQo9vIZC2sdePRU63EdwZLD0vHXZJY2R479MWjkfWTkKIe3BwUB+xqvhKAkssRgu0IYSTOslD/Vqo5I6Kc9yX8Uss98YuuJv90uPTVEMKbrVfWI4wqiwE34Y70vFHpxaSc3A8/PSfFMbVMhc8sui8=; 3:brk/NjLvJ9Nmlag66Unpt8BpA9RvmuOXgrW2s5MaKCX4QQzBLKQ0iFQMYMeLwhA4TOSTvMA3cH7vZIR5QWwmQlBMXEsVviVX8QYVUb8eYuc1dru/Q84c9zdU+3REQ8pEKAmLD06Jh4nte1+qe4/Hx1sCjeG4S4x+p+TKy7HCCeEd12nZ59TjBlNtlA58mDA6PGni7N+iejrkhulUFIX0DRFXFHaF/NECBAqKvvyJAkpYfQ0F3eWFewMrofywVuX2CAKNVpmfk1TKG5Eo3o6GVVGPuZhakyZWVsbREyIvB6g=; 25:yJsRTWChJCW9kdwSRj0dDBoqOaABDKutujDst32d80dp/V8qYy7tnDp/JeenfKgpbY7pzDT0mCF3OU/Z5wWIvUjKrMSNoZGVu96HALj+8aT72zdD5Df0N87VgrkQ1jbuFWFKfVYrefpih1Y2nQUz5CXfNAUG8sJJHmJD9wHIZvlgI6gxZZCAUXfEsgDnA05CrAS5cqb43ytHWsj9hTPOoTUVRBD5FrR+sK6EYioZmhK4Aq4yeZMYVgKBSlUWhrnFgYaG+JsqQ6Hcf/pU3eiEUtB0ZI3mgd/PsGVltfGwMjbN0hULR2HAk+QT6Pc8xka1Gl7Ntps5EcOf57iQh0S3Ud+EN8vt64lH870t1LToA0sY9jc+7Kf2+qSOgJ0pijjWKjirWwZryphtSWa4z4HCKJiBnzFz6ZwWIx+nd9Vja3s= X-MS-Office365-Filtering-Correlation-Id: e449c0f4-3f3c-4f09-c617-08d40cad799a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BN6PR02MB2852; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2852; 31:Dw4X+k1NpHR6n4cCa2TAPLOdDwxBaTFN9aJcs/H+m51aQupbBdDPqCARM2yrDbMfYuDto+ttHKfdc7qyknmBRGhhqic3PK4X26IM/FM4QToidycMM2ct/IKbs1RzmrTRwA7rKiqDHBdWT1Y15yyk4qqjV99dsp8Y0RIAfeUyQRRf3Feqw+x2/gK20cnFVVb4OOSwXBadeoYrqlQ0jAarTFjTbLKBNmUyF8+opdP/aobtJdD8SNZvOpqfYdp9ep/kITUIH9S0VRi4kPn5ke6fgA==; 20:wzL+xToJpdqAR1k/+MjcrQFibngcp1svqqtbSr02H5Cp3aER+RZ6DvksYVmhFfKCal2hDK/wqSfq/UmtarYpEKrFGzJPy7ENwQwYRTdOdiayYt3eC5132tZs6T4tep6EnBq5TmE6Bx17Jdvaai8zr+D+FQfC34WSEPYDw5GnoLOMikDwH+yr9p8D6TX7XFI4stGAmy95v1maXcDEcNDq9kGEK67qBwsEyO2jQxcabfcfV+mCexLpig78wdMuVSVcokwv3c1ebIohKeBCf/6UFKsG/Eq4fHQ1nUbzLTLFV9GMObs9Q3qpGdyJAECCzOGW4bkiDK9lPCCCI9bzrFtrfBFKyQZvoju1J031Y3p0Lbpe7osBPbz8DVpAnIB8nFl38+YJBdM7DqHuE1sNZ1ZStLhSXuo1dNcuuv91m8wAhKxX9cQ3LFhn2anKVWV9lXxsxMvp9vThzccf1MqZsH3xA9gKaziZmsY0vtVSpdpn/PqV4+0DK1CQGviPCw3Yun4e X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6060326)(601004)(2401047)(5005006)(13018025)(8121501046)(13016025)(3002001)(10201501046)(6055026)(6061321); SRVR:BN6PR02MB2852; BCL:0; PCL:0; RULEID:; SRVR:BN6PR02MB2852; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2852; 4:kpC2heCmRTP/DizUWlP1SwoMyuYkvnjIVmDF35J8/K/1pD6CR7S14AuiZ7FENA1prQVZbucLhDKISNmRULgByigHSVcr35q/YZE0MRjV5SB/3fxsH6YJU0e7Q/Gcr5eRJhKijc9/kvIMlL1NK5W/yeJlpYFZ+FIbzUQTkaBbKnf3ZJ7viCzsWB5WI6Q6aWW6o7Y+ZU2lBwXc93vu1kvr/Ol96Jb0enOZZNDzVLbKwiaAFk/yc9lEYkMOKLVDPnWfBy4Y0oAsn+JNzvW0sP6SvQxQqUvvEcOcp7BK++1ri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microsoft-Exchange-Diagnostics: 1; BN6PR02MB2852; 6:B7plo5inYAIA8YF4QpwVAmMj9+SD3o6Zq09TefqgnZmRlhzvxfSXgDMWvaFHGaOtTsLEvPydriwqgQX/7Qvg8oIJdoh4wh2g3YYYZb+KAT9stE5p7dtL4DZSKkZG26fJby6EfCHT9jVZjQWeBHieI13jPOWD4V7KDr5qHY+wH8sQSr7ihS05nEbDmeIiNzVxkHvVi11O4PZDPc6/mvwKIJgyH1gNSHEVT2Ecu6+ztorhopGhNNahk/L4oEEnYDhY7tp8UK7UlFW1EkrAcgh7hPrVKZB5+eklYt11lwaXdNVGsLJay/Ze6nPwvGHRxdfUOdZ/WxTOaEPX7SVhVJyN06Ml4KCgAI2yhjGDWEHWD4i1tD+5SGRS/caowuBQYIaZ; 5:PoFlboFMzBl1eHD0sX4/Ac4DV3eLtDyGwXlAhnsWDoBzLhdMQDOQ3kImu7e8VPQvjxLcELgJq6eXDi4BGUbiD8rIZuAFhKDSYBNUm539OJoXERrcVUHZrxadP/kIX1exYqVN8fEf8nRD9F9evY6k7A==; 24:usBBja1PJzcdvx3uEAr/kbj5t/dysEKhB0Qfj6AnRxk2ffo+PKOmzWuxPj4hM/NXR1KMsntOjySJxqsQ/mZJp2voLjh5JSYrzBthlBmot+A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2852; 7:8mtZZsteiQ242VaanYq06aNAZRc8jx5Ful6EJGgFsaNbrmECUvZE5GPvseS7w6QYzypE/g3qLzMbmUzLBu0SE49ePBEqCE0xbRfdHVufItym+Z/dPWzOLiFAXRs8wy9MG937LIvpXa3OD3XfYZhd0k/E4Pptxn1asX9hLkHUUDXybDoQ8dEGHB0GOukykyQXGa2R1vdB9rI9HtEo/ICxDoBCyEFCCW2u6It1YHYG+fSFJ500LL2p/Qe74HDPE0xdjp13IwqsOK7EQs2i1tCnZpA7+QNSLvHcCQ+YwcJTNVU0JMRUHdrYKHvC95DLpBV+iOKqA1Xp2KkXXy4JwAbW8DlpP7hYJz5l5vfrST8wWXY=; 20:t5cY2VY83iFU738jVGciHB1jxPCQ0fFgjLXqEHbTPcMulVQ+/nxld5bQxtiVMMWYrS6/7nvzxMMqJgOw04xLMZeBISDitG/Nis2mHUG9ekzw5SsZocVotsom17OCsX2gj6Gy/hq72A3okzhJxstoZ8bPQyojoL2K8M+QtymHvR/etkbl464NPcP84oWitYnPbdAEOkVIeJzfTHZxWaMxug/T9M8OOK/TNHSTYuWRr4196njH/wlaXNmPYMrYv62l X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2016 16:44:17.4676 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2852 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 The special QP creation error path relies on offset_of(struct mlx4_ib_sqp, qp) == 0. Remove this assumption because that makes the QP creation code easier to understand. Signed-off-by: Bart Van Assche Cc: Yishai Hadas Reviewed-by: Laurence Oberman Reviewed-by: Yishai Hadas --- drivers/infiniband/hw/mlx4/qp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 570bc86..b63d6be 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -644,7 +644,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, int qpn; int err; struct ib_qp_cap backup_cap; - struct mlx4_ib_sqp *sqp; + struct mlx4_ib_sqp *sqp = NULL; struct mlx4_ib_qp *qp; enum mlx4_ib_qp_type qp_type = (enum mlx4_ib_qp_type) init_attr->qp_type; struct mlx4_ib_cq *mcq; @@ -933,7 +933,9 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, mlx4_db_free(dev->dev, &qp->db); err: - if (!*caller_qp) + if (sqp) + kfree(sqp); + else if (!*caller_qp) kfree(qp); return err; }