From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D73C4C433FF for ; Mon, 5 Aug 2019 13:23:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A92752075B for ; Mon, 5 Aug 2019 13:23:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011418; bh=tR80RKLiYyO62eOmC/atnvTDvAEsrxrWm1zRFAYK47g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0Vn3F0Spr8LyGVWi3u6T/lTfalrzdbwG+saUMonJuoYMn/MU9T6ZejdnuGNZLph3u CjAbDZhGgunoennvSRQY5Swfq8HGeNm8fXf718FKWd4z9095aMhtUmYRm2r2b3XVKS 5x3cRYpNjz/APf+fPX7ke83U4jmdpiODYLs/UuOE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729754AbfHENXh (ORCPT ); Mon, 5 Aug 2019 09:23:37 -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