Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250AbdHNUTq (ORCPT ); Mon, 14 Aug 2017 16:19:46 -0400 Received: from g4t3427.houston.hpe.com ([15.241.140.73]:53426 "EHLO g4t3427.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbdHNUTo (ORCPT ); Mon, 14 Aug 2017 16:19:44 -0400 From: "Kani, Toshimitsu" To: "bp@alien8.de" CC: "linux-acpi@vger.kernel.org" , "lenb@kernel.org" , "mchehab@kernel.org" , "tony.luck@intel.com" , "linux-kernel@vger.kernel.org" , "linux-edac@vger.kernel.org" , "rjw@rjwysocki.net" Subject: Re: [PATCH v2 4/7] ghes_edac: avoid multiple calls to dmi_walk() Thread-Topic: [PATCH v2 4/7] ghes_edac: avoid multiple calls to dmi_walk() Thread-Index: AQHTDKTuWyxK/OMe00e0Ovda8CeGBqJzlIKAgAEZcQCAAIyugIAD9yeAgAW2iQCABSfDgIAACkUAgAAEFwCAAAdxAIAACkmAgAAGWwCAAAC7gIAAB8WAgAAEpwCAAAu+AIAACWYA Date: Mon, 14 Aug 2017 20:17:54 +0000 Message-ID: <1502741290.2042.147.camel@hpe.com> References: <20170811090414.GB9432@nazgul.tnic> <1502725671.2042.137.camel@hpe.com> <20170814162436.lta5xm742hh6g7yk@pd.tnic> <1502728754.2042.139.camel@hpe.com> <20170814170552.j3lhzvnwlpz75y4g@pd.tnic> <1502732561.2042.141.camel@hpe.com> <20170814180526.wtfjzgc6uye2qtx6@pd.tnic> <1502734083.2042.143.camel@hpe.com> <20170814183551.sgk2i7lxpmpyodhv@pd.tnic> <1502736750.2042.145.camel@hpe.com> <20170814193432.mjldfhfal5ba5dt7@pd.tnic> In-Reply-To: <20170814193432.mjldfhfal5ba5dt7@pd.tnic> 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=toshi.kani@hpe.com; x-originating-ip: [15.211.195.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DF4PR84MB0186;6:0hWo7spEog2L3Y1bLpmFWT1BFnQxL5mjuInL+jKglxNnxd2lQKOKDOZlMPm1Iyfep5Rr23CdW6hGzI7RDbFkdP7aQEAkw76PRCc+KUjyZjQImThyo38O7aMYbHmA97iLFMMR3NF23QgL+IcNjeQYdcgI0rrmKmYeul/OLsqgJkKqUnrL6CDiUH61Il/Y+dEdccnyU9JYt8FXnPOQ5osRHCdwcYXK6fkZ1lXAtSJEhd2FWGgHjoOzZVqHeEe2jxbrCdX6Y9GUwDKHQK/ybNrMNWVhvO1PQSySjZqG3QI+0QNsSGf0CVZZXIs+QuoMHkhDSZrSS8/jOn6Kg22+C+efkg==;5:7tu4myMlOhMG73R0kEY3zTQtA0z9FW5lZV4e8QS8X+fTaFxdGJm426u7UHECE2wwNUlN6OtNjxgyr5OCvpzvW6JLSDjt4cYFC3LVrxlDtDtYJdQssEc7PkQ883/azKX1s25szwJV50TZ3Rl/pjqYqw==;24:pf9NTZ2GjI2lVAS8A4EBsFWyGy27fhlyrrcbiStD+9dShv83xMu1Kbhl55rBkhN1VCNvIKsWt9RfE4d568Xcab71RQK287EeX2Z5xan0VLs=;7:z/e7U0zS3bCOMXwQgs2m/9bQazCk6p2WiWYnInTEHeqgIKtw2tSgX9P/Ddg385EOQcs7KwGrVHPetsibNZDfjPGmxhsVRnd+iyzVJ6Ue/mB5SLs1FeD1IXXoZjaCEoMFYJGgEBi1pdhIuS47dmuNuThVrBN0Q2iMNGQ8ejJym9RPa60/w+I3Tg98QDQ/6RoM/oGkBdq3KjWO5hsZFkJX0zJvMXJQHb3CAqr8p0gpzbQ= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 09e43956-26a9-41e7-83c1-08d4e3518bdc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DF4PR84MB0186; x-ms-traffictypediagnostic: DF4PR84MB0186: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DF4PR84MB0186;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DF4PR84MB0186; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(199003)(377424004)(24454002)(189002)(102836003)(6116002)(86362001)(106356001)(3846002)(7736002)(25786009)(2351001)(478600001)(305945005)(8676002)(105586002)(101416001)(33646002)(81156014)(68736007)(76176999)(50986999)(54356999)(189998001)(1730700003)(93886004)(66066001)(2900100001)(5660300001)(103116003)(8936002)(81166006)(36756003)(6506006)(6436002)(5640700003)(4326008)(77096006)(6486002)(54906002)(2950100002)(6916009)(6512007)(3660700001)(110136004)(2501003)(229853002)(14454004)(53936002)(2906002)(3280700002)(6246003)(97736004);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0186;H:DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2017 20:17:54.3329 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0186 X-OriginatorOrg: hpe.com 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 v7EKJrUH031683 Content-Length: 790 Lines: 18 On Mon, 2017-08-14 at 21:34 +0200, Borislav Petkov wrote: > On Mon, Aug 14, 2017 at 07:02:15PM +0000, Kani, Toshimitsu wrote: > > I do not know how likely we see such case, but the code should be > > written according to the spec. > > Well, then you'll have to make ghes_edac_report_mem_error() > reentrant. Which doesn't look that hard as the only thing it really > needs from struct ghes_edac_pvt are those string buffers. I guess you > can try to do the simplest thing first and allocate them on the > stack. ghes_edac_report_mem_error() is reentrant as it is now. I think the current code design of allocating mci & ghes_edac_pvt for each GHES source entry makes sense. edac_raw_mc_handle_error() also has the same expectation that the call is serialized per mci. Thanks, -Toshi