Received: by 10.213.65.68 with SMTP id h4csp22924imn; Fri, 16 Mar 2018 16:06:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELtGTdBnZZZRZimPdykVJRjKxoDo4mk0xzZ1uf+Jk0pfcO/8sZDlF0o9Akh240FUGye05rUO X-Received: by 10.98.134.10 with SMTP id x10mr3058174pfd.78.1521241572765; Fri, 16 Mar 2018 16:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521241572; cv=none; d=google.com; s=arc-20160816; b=qvUk21mFvPaDJsAN/HZvcipVN+mQYAi5N4Df3iqm1a9pcQnu5xOCbigrp0FIL2Xv6V 2CzytP44c9uB5GsBbowScpR6tPf1cRXRPXOmc13tjnpm9hW4NjBIOlXPTAYAOmQRa7de UlK1v+5pLhdeSgPTPlge6MaedlkzKbSP31C81VO5vZSnjyeRjehridCOvaKzy4gFHBVn 2MH94U5PCsiplHcKa/hoiJXHPVtvBzO15MPNf0USPQM/ZzRPL0ngsysebCOM6S9ySvzF 1d372JsvaSetUup0Pmrk0t0o29C7yde5/Q9djaqpojXk/q/4ErlMHdfP+7LAgfdpFx4N TNgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=/DKXP0npSg+5vQJsLOIoQ6e/y7I9ZdYBwyPospX3CYc=; b=QxHVzKhGmjJsOtwd8I9adeDe0bYQU9DDQOrxHIHN/O7Mu18SJO3359CBFOrBo6xyCg 0Fxw18bQvY9sjr4kG4bF3OyEfNTC9KUMAn9hjHNdcwSej1pa/hFbUTJ1+5aml8Uo4Aq0 qdf/Nw7jRlyfLrSKOeI6QlxUNtKqlcB3sk+dS4soub6HhX+BbJoKyb+vPiUoveMenpwR NC9SlKUWceNcmfAF3iuYOQ79SMr/m1yB/OZLUflkwdrpmFQPAq7cTQXuH7X9Vs1W8Soq hitHggss9rkbQ4G9jHSzp5q/6PS7r69j6Wck4yBZ8+9qnAC1fYD2J7UKBQZRgBZVUg0e cKGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OJi7decR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f27si4163911pgn.484.2018.03.16.16.05.58; Fri, 16 Mar 2018 16:06:12 -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=@chromium.org header.s=google header.b=OJi7decR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752699AbeCPXEx (ORCPT + 99 others); Fri, 16 Mar 2018 19:04:53 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:38990 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915AbeCPXEu (ORCPT ); Fri, 16 Mar 2018 19:04:50 -0400 Received: by mail-pf0-f193.google.com with SMTP id u5so4734072pfh.6 for ; Fri, 16 Mar 2018 16:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/DKXP0npSg+5vQJsLOIoQ6e/y7I9ZdYBwyPospX3CYc=; b=OJi7decR2H9FEekN7IfWCV97s44YfIYQdp9U1RxFUUNNI7pIf+ul8vnBHKWwB02W0+ MK2J+HTvJytFymDPYzVQggOVviqld7dVC3SwQHCtfUVWhEt04qcxAcl9tblRQxf4nHqg ZgoPaKTS6oEPtA4DFX8V/PSNgE9P3WHvrH1YM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/DKXP0npSg+5vQJsLOIoQ6e/y7I9ZdYBwyPospX3CYc=; b=Ug6GnIlloSZkQC7WCeO2Ytmd7yllXp6ImQQm9AHRbZ3hz8pDX6AXLj4hAVznQLoM+E mvtLNQ2mEM1D9C9V8/9IHgFSlkr9srzn+LBJbQqf2h2kvrqg6C55xCxwC7Nmd9/wldEO dIAriytA5PIKJckBATlTHTky/o7TPmJAv95wjD2IDnZaXr/7hHQMku0ZBipisweEyWzO ZOJ+rLBk5yCUoBHWnST2zWCL6EhQspmNjZBYBpKrsyZTePS4lSLYI2eZq5tIB189I1Sv 6M5OGl1KQMBI59D8IgA5ONfI1NrvVU8F4cBpg2bavhA/1aOFfqdoGk+i3/AKskTFl9Eq toRA== X-Gm-Message-State: AElRT7EKzVEc18m83ppdIPBeLNAd3m8KIZiPO6uObO3YH/CKiSq+D2Nf Idu4nMFlK8N68PU30yiik/ahLA== X-Received: by 10.101.97.72 with SMTP id o8mr2852409pgv.119.1521241490253; Fri, 16 Mar 2018 16:04:50 -0700 (PDT) Received: from localhost ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id 2sm18487430pfo.70.2018.03.16.16.04.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 16:04:49 -0700 (PDT) Date: Fri, 16 Mar 2018 16:04:49 -0700 From: Matthias Kaehlcke To: Nick Desaulniers Cc: Andrew Morton , Dan Williams , Michal Hocko , "Kirill A. Shutemov" , Jan Kara , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Hugh Dickins , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] memory-failure: fix section mismatch Message-ID: <20180316230448.GA37438@google.com> References: <20180304071613.16899-1-nick.desaulniers@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180304071613.16899-1-nick.desaulniers@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El Sat, Mar 03, 2018 at 11:16:11PM -0800 Nick Desaulniers ha dit: > Clang complains when a variable is declared extern twice, but with two > different sections. num_poisoned_pages is marked extern and __read_mostly > in include/linux/swapops.h, but only extern in include/linux/mm.h. Some > c source files must include both, and thus see the conflicting > declarations. > > Signed-off-by: Nick Desaulniers > --- > include/linux/mm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index ad06d42adb1a..bd4bd59f02c1 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -2582,7 +2582,7 @@ extern int get_hwpoison_page(struct page *page); > extern int sysctl_memory_failure_early_kill; > extern int sysctl_memory_failure_recovery; > extern void shake_page(struct page *p, int access); > -extern atomic_long_t num_poisoned_pages; > +extern atomic_long_t num_poisoned_pages __read_mostly; > extern int soft_offline_page(struct page *page, int flags); An equivalent patch was posted by Guenter Roeck and has been picked up by Andrew: https://patchwork.kernel.org/patch/10243919/