Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp631621ybi; Fri, 12 Jul 2019 02:06:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq4xkWCOTkvzzvd83QJeDlvk2a3gmwcFP9uKIH8RznGCa/raH3nYyxGBVm+Wt6QW4tHj03 X-Received: by 2002:a17:90a:26e4:: with SMTP id m91mr10386624pje.93.1562922360063; Fri, 12 Jul 2019 02:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562922360; cv=none; d=google.com; s=arc-20160816; b=NduJZrybto3W6cqCX2WHgHik2k5dQTfauZ02cjHqcOm3dYPm1Mk5dim37ay4En5fUd x7KGT1VdAm95P9RWZ9By9ZL4NchN1q0DBz4ERZ33skhRNk97pn7Igj6C54MbTe+2G6bF coUQ/rDCQFUJeLwTJ2cMUGLxFbKuYriMc4zwKbgY+dI66+C4lI8+TMFxpozNTlYaplEx yuxxKeJqnP98MVKfc38+xdAskxQ/9HpRLb5vWX00K9T21KZEDrmfwL5umSfDfVTgE0aJ KRIa2Sv3jm4xMg1RF9HDCc9AsvvzH0DoR8+c0g7TKHLJYFcHIGnygwdMjc6acLl8ece0 Gllw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+HBe9Alwaw2a4PnmAusbor0qMLzxOZ6v3mYmR08nWEc=; b=lSpBTXkXM6h04Q3G33YmQYHh5TQuWzV05EJfZXPi3L1pAzd2GBxmuoBkc831+RYNnP KD+oTers8GOyAN/d3OTiqzxtkfT/XUAv5//Oo3PAo5HTo2MPl6WoSP0mCwTiEwpujEHD kOg8Idkg4hpHzMmCPol8SyvT89ej/OMzbj6T7v03ZuKvg4xAwXHjbdvElIsD5ABOCfP2 4GL1zgAgToWYyaZ2WrOas2hG5Bo7Vv14KWFEi2Cwx2/rLTArrh5SY9ZeWCiPtfN4TTvs BkIurABKkZQsxiQf2h0hmsYkHHdrdfGy4KPRnqB17jWJRfvi6qaPWsrEfkRfPEwELF/F IH+A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u27si7578934pgn.231.2019.07.12.02.05.43; Fri, 12 Jul 2019 02:06:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726096AbfGLJFR (ORCPT + 99 others); Fri, 12 Jul 2019 05:05:17 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:45061 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbfGLJFR (ORCPT ); Fri, 12 Jul 2019 05:05:17 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MV6G6-1hwH5Z2EoY-00SB3h; Fri, 12 Jul 2019 11:04:59 +0200 From: Arnd Bergmann To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton Cc: Arnd Bergmann , Stephen Rothwell , Roman Gushchin , Shakeel Butt , Vladimir Davydov , Andrey Konovalov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] slab: work around clang bug #42570 Date: Fri, 12 Jul 2019 11:04:39 +0200 Message-Id: <20190712090455.266021-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.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51Z4FBGauyIZAB2MKq45G9BqYlZQN9eQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang gets rather confused about two variables in the same special section when one of them is not initialized, leading to an assembler warning later: /tmp/slab_common-18f869.s: Assembler messages: /tmp/slab_common-18f869.s:7526: Warning: ignoring changed section attributes for .data..ro_after_init Adding an initialization to kmalloc_caches is rather silly here but does avoid the issue. Link: https://bugs.llvm.org/show_bug.cgi?id=42570 Signed-off-by: Arnd Bergmann --- We might decide to wait until this is fixed in clang, but so far all versions targetting x86 seem to be affected. --- mm/slab_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index 6c49dbb3769e..807490fe217a 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1028,7 +1028,8 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, } struct kmem_cache * -kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init; +kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init = +{ /* initialization for https://bugs.llvm.org/show_bug.cgi?id=42570 */ }; EXPORT_SYMBOL(kmalloc_caches); /* -- 2.20.0