Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757013AbdLGRaT (ORCPT ); Thu, 7 Dec 2017 12:30:19 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:55216 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756231AbdLGRaH (ORCPT ); Thu, 7 Dec 2017 12:30:07 -0500 X-IronPort-AV: E=Sophos;i="5.45,373,1508774400"; d="scan'208";a="160679936" From: Bart Van Assche To: "sfr@canb.auug.org.au" , "paulmck@linux.vnet.ibm.com" CC: "josh@joshtriplett.org" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-next@vger.kernel.org" , "martin.petersen@oracle.com" , "ptikhomirov@virtuozzo.com" Subject: Re: linux-next: build failure after merge of the scsi-mkp tree Thread-Topic: linux-next: build failure after merge of the scsi-mkp tree Thread-Index: AQHTbw+FQmxMixfEw0+8LVgHxCD8WaM3QXCAgAAHOoCAAATBAIAA1nwA Date: Thu, 7 Dec 2017 17:30:03 +0000 Message-ID: <1512667802.2624.20.camel@wdc.com> References: <20171207145728.57cd9ac4@canb.auug.org.au> <1512619169.3298.3.camel@wdc.com> <20171207152521.0036b131@canb.auug.org.au> <20171207044222.GK7829@linux.vnet.ibm.com> In-Reply-To: <20171207044222.GK7829@linux.vnet.ibm.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=Bart.VanAssche@wdc.com; x-originating-ip: [199.255.44.171] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1533;20:G9NSFCQmwZVBmLEs4GVTKBLVpLkaHPVQb9QMMrAFt0EDFtV1GgzC8SGBKYFidtn2ceRGuSqmh1P18dOPHGVs6Eyz8ZnKwQ9RLDYZRaHu+4n3Q1L3JoMXL21qKhZnl4j1TL0E0DAlDAyiWjBhKhfHmruxAiU7BdXFrgE5WN3i+/U= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 4e673f2f-4e14-44b5-963e-08d53d9826b9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603286);SRVR:CY1PR0401MB1533; x-ms-traffictypediagnostic: CY1PR0401MB1533: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(104084551191319); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(3231022)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(6072148)(201708071742011);SRVR:CY1PR0401MB1533;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY1PR0401MB1533; x-forefront-prvs: 05143A8241 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(366004)(189003)(199004)(377424004)(24454002)(86362001)(4326008)(97736004)(2900100001)(101416001)(5660300001)(8936002)(6436002)(110136005)(54906003)(2501003)(66066001)(229853002)(2950100002)(53936002)(316002)(68736007)(76176011)(6246003)(6512007)(77096006)(7736002)(305945005)(102836003)(105586002)(3846002)(106356001)(72206003)(6116002)(103116003)(99286004)(93886005)(3280700002)(3660700001)(2906002)(25786009)(8676002)(33646002)(81166006)(81156014)(14454004)(478600001)(36756003)(6486002)(6506006);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1533;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e673f2f-4e14-44b5-963e-08d53d9826b9 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2017 17:30:03.6032 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1533 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vB7HUOKZ029886 Content-Length: 3056 Lines: 83 On Wed, 2017-12-06 at 20:42 -0800, Paul E. McKenney wrote: > On Thu, Dec 07, 2017 at 03:25:21PM +1100, Stephen Rothwell wrote: > > On Thu, 7 Dec 2017 03:59:30 +0000 Bart Van Assche wrote: > > > On Thu, 2017-12-07 at 14:57 +1100, Stephen Rothwell wrote: > > > > After merging the scsi-mkp tree, today's linux-next build (x86_64 > > > > allmodconfig) failed like this: > > > > > > > > ERROR: "init_rcu_head" [drivers/scsi/scsi_mod.ko] undefined! > > > > ERROR: "destroy_rcu_head" [drivers/scsi/scsi_mod.ko] undefined! > > > > > > > > Caused by commit > > > > > > > > ac90420f17c9 ("scsi: core: Ensure that the SCSI error handler gets woken up") > > > > > > > > I have used the scsi-mkp tree from next-20171206 for today. > > > > > > Does that mean I'm the first one who added RCU code to the SCSI core? > > > > The only other uses of init_rcu_head() are in drivers/iommu/intel-svm.c > > and kernel/irq/irqdesc.c. destroy_rcu_head() appears to not be used > > anywhere ... > > The key point is that Bart appears to be the first to try using them in > a module, for which exports are needed. Does the patch below help? > > Thanx, Paul > > ------------------------------------------------------------------------ > > commit cde4691a3a4591e7355295dd62610e3262159002 > Author: Paul E. McKenney > Date: Wed Dec 6 20:39:38 2017 -0800 > > rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules > > Use of init_rcu_head() and destroy_rcu_head() from modules results in > the following build-time error: > > ERROR: "init_rcu_head" [drivers/scsi/scsi_mod.ko] undefined! > ERROR: "destroy_rcu_head" [drivers/scsi/scsi_mod.ko] undefined! > > This commit therefore adds EXPORT_SYMBOL_GPL() for each to allow them > to be used by GPL-licensed kernel modules. > > Reported-by: Bart Van Assche > Reported-by: Stephen Rothwell > Signed-off-by: Paul E. McKenney > > diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c > index 8d591d8411fe..4c4d26e9a67b 100644 > --- a/kernel/rcu/update.c > +++ b/kernel/rcu/update.c > @@ -422,11 +422,13 @@ void init_rcu_head(struct rcu_head *head) > { > debug_object_init(head, &rcuhead_debug_descr); > } > +EXPORT_SYMBOL_GPL(init_rcu_head); > > void destroy_rcu_head(struct rcu_head *head) > { > debug_object_free(head, &rcuhead_debug_descr); > } > +EXPORT_SYMBOL_GPL(destroy_rcu_head); > > static bool rcuhead_is_static_object(void *addr) > { (+linux-scsi) Hello Paul, How about changing the commit message into "... fixes a build failure with CONFIG_DEBUG_OBJECTS_RCU_HEAD=y"? Otherwise the above patch looks fine to me and fixes the reported build failure on my setup. However, what's not clear to me is through which tree this patch should be sent to Linus? Should the above patch be sent as a v4.15-rc fix or should Martin perhaps queue it in his tree for v4.16-rc1? Thanks, Bart.