Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3854035imm; Fri, 25 May 2018 12:53:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrjI+nD5Fnww/AAEcxPThkmRPMnKA3tXc8ZuF/dWX74EXJaZ8ima6rJojdH6Bn/88ziVXD3 X-Received: by 2002:a62:6304:: with SMTP id x4-v6mr3920464pfb.94.1527278016138; Fri, 25 May 2018 12:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527278016; cv=none; d=google.com; s=arc-20160816; b=hU3heB8e/hJWEEKYR95+aVs8HU2EHMTuGYsyrGgC9XFTjJ/1oB17L2Htslc5l4QhJ7 WmY62QCli0ImggKY6C9hdhD7+QN564InD3tZfvD6I2kKNjP6vR1AA5UZ/hNISkt1NOhB FqZI2utfylOVOcgxxw8HkCQWG9Ouo4T0qLJmIg0rwH6hRstLrc2S3QzQYcjJgjaxuU9T 18FYLVjZwj4JgxzJjavGy29zSoQk0BizRwIzbzmH4NQwal1QYd1NyoVZ4rKCCUhie0bt jjNxbU46DlrgQWwZUw1SetCqC8iZoQ85g6FL3d6vumXl0q0moggoho47Tf09N+obDIeJ bfqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:msip_labels :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=na0My57hF5SRcUAPwk4HGmgy2nbFfs8gLpSPpDHdXjM=; b=dDTr5FWyDnmH2NIzE0Bq5yyJULXV38OxMHhtmOkC2jzoYOSd4gzX2ucQU3XIVauIdA 7bT9qeBBKFrVbVXFmRoN48ZYMCtJhaigEbiYweOx1bKzVZ/kMn9DT9IUuqM/vaK84sxQ 7GDC4bk0kPHscuZbO1Amb4CLu+6nUpxH+yIDrnN+oqkuGaRmp4O5qM/tvSXLS/1n+ITe PlDp8DKeEXxaWlX9Kmv+3bNf6s3BbZ23M1K/BwfzBKdufDjEnFQl+dq36JZJDIfjH+8a /YJqoa0Cjv3+oTx8DZALa4O1ml2X4zitB0nBQ9FU5ANpywhM2OG2fvsKAfim75hinyYx PSQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Z9M13Oox; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4-v6si25094546pff.24.2018.05.25.12.53.06; Fri, 25 May 2018 12:53:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Z9M13Oox; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968317AbeEYTvz (ORCPT + 99 others); Fri, 25 May 2018 15:51:55 -0400 Received: from mail-co1nam03on0116.outbound.protection.outlook.com ([104.47.40.116]:7344 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967823AbeEYTvx (ORCPT ); Fri, 25 May 2018 15:51:53 -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:X-MS-Exchange-SenderADCheck; bh=na0My57hF5SRcUAPwk4HGmgy2nbFfs8gLpSPpDHdXjM=; b=Z9M13OoxFrmSu+FU6p2SWS+1R53rHFAlXaDehCMdrG4C+9EcpGkNUsmnchWr7le35Xjbp23+BRqP8ltrkp/JKBadkKNRE/aHCMJkAHuOCmGyLXp6E2ZNumYcA0yNkEJueZ4mCOe/46Aj6+3teUcI7Bufonlv0rtSGNK/YkfZpcA= Received: from BN6PR21MB0161.namprd21.prod.outlook.com (10.173.200.7) by BN6PR21MB0179.namprd21.prod.outlook.com (10.173.200.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.2; Fri, 25 May 2018 19:51:50 +0000 Received: from BN6PR21MB0161.namprd21.prod.outlook.com ([fe80::e455:edc:5ed:da52]) by BN6PR21MB0161.namprd21.prod.outlook.com ([fe80::e455:edc:5ed:da52%10]) with mapi id 15.20.0820.001; Fri, 25 May 2018 19:51:50 +0000 From: Haiyang Zhang To: Dexuan Cui , Lorenzo Pieralisi , Bjorn Helgaas , "linux-pci@vger.kernel.org" , KY Srinivasan , Stephen Hemminger , "olaf@aepfle.de" , "apw@canonical.com" , "jasowang@redhat.com" CC: "linux-kernel@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , "vkuznets@redhat.com" , "marcelo.cerri@canonical.com" Subject: RE: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg() Thread-Topic: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg() Thread-Index: AdPyKucLHxE0xn3+RTSKXedSJeHHcgCNtVtQ Date: Fri, 25 May 2018 19:51:50 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-05-23T00:18:18.8931354Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [69.130.166.81] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR21MB0179;7:IDX78+Vc8hTqNZHjqU3OfV9BkbuXHNd7DXRwtD64cMA7iAVFvcYHa1OTdvJfm3Cb+HnPW5Pwr0JsDgUe1j7V9YQNco6JuLhoMnFuUgRuEnrUM5vhfLrcsMIj4yxbZJrvye16fbqCclz8m1NjBwg+syxe2bH56+5uW4hn4EcJzUXLnBYMLFJI0ftH1lI4ZfRvsHptKbBxty/AMBB6I9hkK+h3ReslXHbY50VvdBTMo9CSudxgfG6h8EURWjqt10LA;20:ZABkQYWqbAim9IISDSNwUAI3nSN0BW/yf0Hh+yrFDreFpFm09pRlJuGXDaRXQiEK9bipM8JK5d/49XbOcxLVTbtPo/gypF1sL/cB4Xmu0Ou9gRAorh+/3j7ufEzElsY468bOtEFy1vjjqG4sGoH9WeY6FO2OIA8gFOpIvLW6B3I= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7193020);SRVR:BN6PR21MB0179; x-ms-traffictypediagnostic: BN6PR21MB0179: authentication-results: spf=none (sender IP is ) smtp.mailfrom=haiyangz@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171)(9452136761055)(211936372134217)(153496737603132)(198206253151910); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(2018427008)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:BN6PR21MB0179;BCL:0;PCL:0;RULEID:;SRVR:BN6PR21MB0179; x-forefront-prvs: 06833C6A67 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(366004)(39860400002)(39380400002)(346002)(376002)(13464003)(199004)(189003)(575784001)(86362001)(5660300001)(14454004)(68736007)(74316002)(53546011)(7736002)(6506007)(7416002)(2201001)(305945005)(8936002)(8676002)(2906002)(81166006)(81156014)(76176011)(478600001)(11346002)(446003)(7696005)(25786009)(59450400001)(86612001)(99286004)(3660700001)(486006)(3280700002)(102836004)(26005)(10290500003)(476003)(2900100001)(66066001)(33656002)(54906003)(229853002)(110136005)(316002)(22452003)(6436002)(1511001)(53936002)(97736004)(105586002)(3846002)(6116002)(6246003)(55016002)(9686003)(8990500004)(10090500001)(106356001)(2501003)(4326008)(5250100002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR21MB0179;H:BN6PR21MB0161.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Q8eO0mT5qSmw5M3lgvCKuf+zN+i2QYBHSLd69HjV+/Qb4kFbSxEFd67a6gdBk5ZOXXrj3vkc+rlC4gICbo47+VFMrJDNIePbD3oNVVseLyTgNXi83lvFqAF0UftnvA4dJkvnsmUKDpOxd4h4pZIxivm/QSQhvt5puWS7lLpsz5TtDsgqniF/Z0PZ9+gqjJd3 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d84c623c-64ab-4ba2-78b4-08d5c278f519 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d84c623c-64ab-4ba2-78b4-08d5c278f519 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2018 19:51:50.5573 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0179 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Dexuan Cui > Sent: Tuesday, May 22, 2018 8:18 PM > To: Lorenzo Pieralisi ; Bjorn Helgaas > ; linux-pci@vger.kernel.org; KY Srinivasan > ; Stephen Hemminger ; > olaf@aepfle.de; apw@canonical.com; jasowang@redhat.com > Cc: linux-kernel@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > Haiyang Zhang ; vkuznets@redhat.com; > marcelo.cerri@canonical.com > Subject: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in > hv_compose_msi_msg() >=20 >=20 > Commit de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()"= ) > uses local_bh_disable()/enable(), because hv_pci_onchannelcallback() can = also > run in tasklet context as the channel event callback. >=20 > With CONFIG_PROVE_LOCKING=3Dy in the latest mainline, or old kernels that > don't have commit f71b74bca637 ("irq/softirqs: Use lockdep to assert IRQs= are > disabled/enabled"), it turns out can we trigger a warning at the beginnin= g of > __local_bh_enable_ip(), because the upper layer irq code can call > hv_compose_msi_msg() with local irqs disabled. >=20 > Let's fix the warning by switching to local_irq_save()/restore(). This is= not an > issue because hv_pci_onchannelcallback() is not slow, and it not a hot pa= th. >=20 > Fixes: de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()"= ) > Signed-off-by: Dexuan Cui > Cc: > Cc: Stephen Hemminger > Cc: K. Y. Srinivasan > --- Reviewed-by: Haiyang Zhang Thanks you.