Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2759705ybh; Mon, 5 Aug 2019 06:24:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqznQu9Me4U94DoCeLXJbF9ZK57EFdQ26ep0pHaS36GE/Jz7tYjI0l5dZgnBLpiJBIzgWRCA X-Received: by 2002:a17:902:5ac4:: with SMTP id g4mr147786858plm.80.1565011484124; Mon, 05 Aug 2019 06:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565011484; cv=none; d=google.com; s=arc-20160816; b=vLmc0Lzu22AFeDKZ3kise93kSQADbKs0FqUxbOfwYTiUxV5sCzWpt6tde6VOYQQ9X1 EuUFNQh2uT59gLo0SR0uNKQ3V3hPKfvmqZIKyJ2StiEAzQJkhI9RC9+/yyBjacf7DhSH 2sV91QMOAfLf7bEGenQtnYpSHEr6FAhDNiKJzRMMpgc7gRL48tQIEEVibn7Ke0+L9MY7 fSIy5uXAydLxtQ2SXsGtlqh6moHB4vbWaUnPc5btCx+abTK+KQN4rJpKXWz355R3Crei Fao5bAT2+95g8Cbv8QRH2vAPSL0KOdFruxGg+a9LGXHC+isbNSuQm2ANAFdWBTooDVrs 988Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Hbdq4akn+I0Iljstn9x/L8B4e7Ac7sQMleqLUjMTuU8=; b=c6OZnUU4lg4zgML7Q701dPewST6ZJSIICZf04CL7Fzxabo2bgAXPNRHQ777G11TxZR rAMqOVr8/5KIdBz3r/efyIIs8X+KHm5fxs7fsp7I8Yf7fRMMTh2XTR+FXIbJuqvd1g2M 9H1bQgy72iiqwswggfeZAdxzcpjS/IXH7AH6ExAxuSZn/WXqlOvWmV642/rDIEtH8r4j xKTgEDLwhdkdDh8Q5/zPnv26mveZ4V0tBY3fwI2enFglHfgf4mD8/Wvi+KYL/YI3n6O5 VThkZGO3V71Uf8HlzqX5/Svc8yqnVMerW0GuusC0d7TXdULEy7UmWUw3eIFn6CLRccrE LC6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ysmkgFMG; 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 64si39164074ply.399.2019.08.05.06.24.28; Mon, 05 Aug 2019 06:24:44 -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=@kernel.org header.s=default header.b=ysmkgFMG; 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 S1730857AbfHENXg (ORCPT + 99 others); Mon, 5 Aug 2019 09:23:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:60272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730854AbfHENXe (ORCPT ); Mon, 5 Aug 2019 09:23:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D2302087B; Mon, 5 Aug 2019 13:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011414; bh=tR80RKLiYyO62eOmC/atnvTDvAEsrxrWm1zRFAYK47g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ysmkgFMGaVcWSZNqBIl46r8TaPZ94K0mH8ee7hPKZu2yDlkzJUN5W4022UwyVHcR1 sgPiuoIUlMr+g9FpejgTWgryRXreVbzQRORkhMpPFY7appubgbGa0LcAvn0jwWMO7c doU+knyG5MKOrAVL6VmJKJbIGMF64tv+y8TVFRVU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , David Rientjes , Andrew Morton , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Stephen Rothwell , Roman Gushchin , Shakeel Butt , Vladimir Davydov , Andrey Konovalov , Linus Torvalds , Sasha Levin Subject: [PATCH 5.2 048/131] mm/slab_common.c: work around clang bug #42570 Date: Mon, 5 Aug 2019 15:02:15 +0200 Message-Id: <20190805124954.649146552@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124951.453337465@linuxfoundation.org> References: <20190805124951.453337465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit a07057dce2823e10d64a2b73cefbf09d8645efe9 ] 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 Link: http://lkml.kernel.org/r/20190712090455.266021-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: David Rientjes Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Stephen Rothwell Cc: Roman Gushchin Cc: Shakeel Butt Cc: Vladimir Davydov Cc: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- 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 58251ba63e4a1..cbd3411f644e4 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1003,7 +1003,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.1