Message ID | MWHPR03MB2669E217046A38470D7E8A27BFEB0@MWHPR03MB2669.namprd03.prod.outlook.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> 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 1B57760757 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 23 Aug 2016 04:49:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FF43265B9 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 23 Aug 2016 04:49:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0403628BA2; Tue, 23 Aug 2016 04:49:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF9BE265B9 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 23 Aug 2016 04:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752299AbcHWEte (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Tue, 23 Aug 2016 00:49:34 -0400 Received: from mail-by2nam03on0137.outbound.protection.outlook.com ([104.47.42.137]:50365 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751389AbcHWEtd (ORCPT <rfc822;linux-pci@vger.kernel.org>); Tue, 23 Aug 2016 00:49:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+QlannTp1WhpzXoa2Q7eni+aJ85VB+HE15Jdm0KEd0o=; b=XT7+Rx08nJNPAvyVCn/7+ZyAxcRAquEJtSx//YDArNXvo9uG6dHkfS5K4LwiVmNybV3oy4YrpLrjYjsXUeuJ0HRhhBpQV5Jq3DQa5qUNHafUh8TgUfbqxpVZn6mUV9DkXcfHE89F9Ic7pimMuCt9My6T5eYCSaxsfftKOWopxdc= Received: from MWHPR03MB2669.namprd03.prod.outlook.com (10.168.207.15) by MWHPR03MB2544.namprd03.prod.outlook.com (10.169.201.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Tue, 23 Aug 2016 04:49:22 +0000 Received: from MWHPR03MB2669.namprd03.prod.outlook.com ([10.168.207.15]) by MWHPR03MB2669.namprd03.prod.outlook.com ([10.168.207.15]) with mapi id 15.01.0587.009; Tue, 23 Aug 2016 04:49:22 +0000 From: Dexuan Cui <decui@microsoft.com> To: Bjorn Helgaas <bhelgaas@google.com>, "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, KY Srinivasan <kys@microsoft.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "devel@linuxdriverproject.org" <devel@linuxdriverproject.org>, "olaf@aepfle.de" <olaf@aepfle.de>, "apw@canonical.com" <apw@canonical.com>, "jasowang@redhat.com" <jasowang@redhat.com>, "vkuznets@redhat.com" <vkuznets@redhat.com>, Haiyang Zhang <haiyangz@microsoft.com>, Hadden Hoppert <haddenh@microsoft.com>, "helgaas@kernel.org" <helgaas@kernel.org>, "Stephen Hemminger" <sthemmin@microsoft.com> Subject: [PATCH 5/5] PCI: hv: hv_pci_generic_compl(): handle the error case Thread-Topic: [PATCH 5/5] PCI: hv: hv_pci_generic_compl(): handle the error case Thread-Index: AdH8+a6dfaqOeGx/QzKcVP/0Q8h7Mg== Date: Tue, 23 Aug 2016 04:49:22 +0000 Message-ID: <MWHPR03MB2669E217046A38470D7E8A27BFEB0@MWHPR03MB2669.namprd03.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [112.65.1.155] x-ms-office365-filtering-correlation-id: 7e6122f1-c5d5-465d-74ae-08d3cb10d9c3 x-microsoft-exchange-diagnostics: 1; MWHPR03MB2544; 6:YCO1G+/Yhd+MVsvDARr+u/vZkfzigI8qtTi9GO5f9fan+WmNgpX0B2nG0h15z+I7kkbwpiN1aGlzXgvVt87w4jpKfXx44KLwRu3aV6rA3DqViscoX5MRzvtFRgwF3rmxOLQgT60rIoISvzMPjRyqUkJGNs4YkgQqVWX5FOqT0T/3o0FbmtF1ceNJBbu+PQTD9V4APB8XXhUFgqn0cGyP3gth2OxNYdF7YVEOChC6/SJGpRd0n56wXQBJd0WCFlav59WHGM5C+vdr4hgL5MGr0vbAumL0V6fV/fMPHht04ulUeqmPHNe9I3qbbnmKvzolLwmA3ESTNYoSStFPjf9WWw==; 5:xzRePlb4mmlycEYdcG/mtxb00w0n0o1QIEUCr0F/vsItGTmQW0jiUDYk+CRxeBmIbIsZPQvsYyNVr36VR3zIr6DJh+WkVt/obZLk/FCoZ+UQHU4LZ8D/+3XWrPhvEaSbpy18NX9t6/eKViz2/MTNdQ==; 24:9R0hDPMJO8sRiHSl31kZUvNOyVdcYPG8zF01wNh9D/tqM2+bBrHUYyxigu3VyW8rIain0op6j3r+f/OBbwDEUECILlGJeoeXYkaOHJcuC3A=; 7:p32pTvtccZjfTeCShBvKvGpqKBqHlkyrvofaEswITSAQFetzgd95zQ7x2z9rFl/0k7iuans0ijwfCnv+19gnTVyApm7R8hKIu+IlEDNSB79QZNSPdsTAr06M/ZdBd5HL9bitX5ojqSPMNVx6Oj3wtI3c/2pcaVH0jqr4ejNPv4sHZZX/fgUdly+Dbbf3AAI3zxvAUgZgXi0HlnbOB5T0A3/mrTC6/82n8XTOSDR9D4vhFhYNGtfudjXpjJWEvud7 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2544; x-microsoft-antispam-prvs: <MWHPR03MB254481E11A294A6F9D85D727BFEB0@MWHPR03MB2544.namprd03.prod.outlook.com> x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(61426038)(61427038); SRVR:MWHPR03MB2544; BCL:0; PCL:0; RULEID:; SRVR:MWHPR03MB2544; x-forefront-prvs: 004395A01C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(189002)(4001450100002)(106356001)(10090500001)(2561002)(11100500001)(92566002)(305945005)(7696003)(7736002)(5660300001)(7846002)(8936002)(81166006)(81156014)(2900100001)(77096005)(8676002)(2501003)(8990500004)(7416002)(10290500002)(5005710100001)(5002640100001)(10400500002)(74316002)(9686002)(122556002)(97736004)(5001770100001)(189998001)(19580405001)(107886002)(2906002)(2201001)(76576001)(54356999)(99286002)(50986999)(86362001)(3846002)(102836003)(19580395003)(105586002)(6116002)(33656002)(586003)(1511001)(3280700002)(66066001)(101416001)(3660700001)(68736007)(86612001)(2421001)(87936001)(229853001)(41533002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR03MB2544; H:MWHPR03MB2669.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2016 04:49:22.1451 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2544 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index f337239..a93bd5d 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -456,6 +456,9 @@ hv_pci_generic_compl(void *context, struct pci_response *resp, if (resp_packet_size >= offsetofend(struct pci_response, status)) comp_pkt->completion_status = resp->status; + else + comp_pkt->completion_status = -1; + complete(&comp_pkt->host_event); }
'completetion_status' is used in some places, e.g., hv_pci_protocol_negotiation(), so we should make sure it's initialized in error case too, though the error is unlikely here. I didn't get a real issue. Cc: Jake Oshins <jakeo@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Dexuan Cui <decui@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 3 +++ 1 file changed, 3 insertions(+)