Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp437049ybl; Wed, 11 Dec 2019 22:03:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzfC62IOWqYP81yUrrGXMWONoGMJR6XXpPI8A9NrjqJ5pMx74jXHmDOdHiZmo3r/rlG8WOu X-Received: by 2002:a9d:24a6:: with SMTP id z35mr6011549ota.343.1576130592958; Wed, 11 Dec 2019 22:03:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576130592; cv=none; d=google.com; s=arc-20160816; b=X9vuuiNZDoZ9S1CLIrxtKLXi/OWK26DQzWjaRLXQBHzk0KWYEcf9ldcA6jyWWxaL7k EXD2rLTJV+U607u5CVQiwTWrO2Mo6d0+RByhPznlXDU7KkQObd0YbEWTm4yUooK3ZiHM fnBO6t+cZAISLSGBzuHA5M/w7VrWl4CFS7DNRaSKvDTYQlM76QSiE81rEIS6PzYFaLeV f2APnFGPFgTMkCGmfd/nHTUwsCdz/7I+mu0q2f/VcSap6vIFxSRTmpP6W4wUJwPszgTZ 5ekItjpdMjYtll+WPZOmzHGZxbdJKaMqZbc+0zfTILeZyzzU/Oz3r6yuWH1g7jmebMQx lrgg== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=94meGiFuEpTs4Iph1OW1sJx6cyjNl6DzQ0GVPqhU/mU=; b=ESgGGLH49AZYeyEWY0Fsr4fD7S+YZZSjpdb82k8jbUwDvzrGFJwMXzGhjNhuw0vTB6 PLb8kxoj71KzdfAtamjx8itIkZMBm9ulfgXpv+Jd2qQD0xWSY6maDe1gfeGV0a7yhQNh W/mcpwu+Xbou9OOiiHuBlje673xJho6juYEqWaDyo0+d/xbDOYOVvnHvJS2muMIFTN71 ZHBspTK9ye125vKUrM6RE2QSK7PzEFn4hEZeaUNy1Qvd7FAJdh/E6Jd7fhER2W6ze/Rd SBftHNmGru/cR4I9WnRopRMkUeZ3pYZdCt37gqvzqt9DZgQTOa6OKu0u/+GiabdyIJSE aBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E0uFtmRX; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g126si2595496oib.105.2019.12.11.22.02.57; Wed, 11 Dec 2019 22:03:12 -0800 (PST) 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=E0uFtmRX; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbfLLGCB (ORCPT + 99 others); Thu, 12 Dec 2019 01:02:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:48268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbfLLGCB (ORCPT ); Thu, 12 Dec 2019 01:02:01 -0500 Received: from paulmck-ThinkPad-P72.home (199-192-87-166.static.wiline.com [199.192.87.166]) (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 A63F724656; Thu, 12 Dec 2019 06:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576130520; bh=NO9m42cW/b/BbBvcGzyWKOv1cE/P07W3l66y4FInuOA=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=E0uFtmRXSBVlI1RcyyNz/6sv9u/zPh/p7GN5DY2KmyydUz9M1Zhl1mGzvopFHNOa/ 7IIrL6QcFn1mmU3QdtlGEeuDMs8U5NQDTunxc1W+VV6PpVv4GNfIScdm2J8isSYbJr fxupr4VqlnUVBNfAm1+nCVp5dh0sw1j8IGWAZc9g= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 506C435203A1; Wed, 11 Dec 2019 22:02:00 -0800 (PST) Date: Wed, 11 Dec 2019 22:02:00 -0800 From: "Paul E. McKenney" To: Stephen Rothwell Cc: Linux Next Mailing List , Linux Kernel Mailing List , Eric Dumazet Subject: Re: linux-next: build warning after merge of the rcu tree Message-ID: <20191212060200.GW2889@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20191212160622.021517d3@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191212160622.021517d3@canb.auug.org.au> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 12, 2019 at 04:06:22PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the rcu (I think) tree, today's linux-next build (x86_64 > allnoconfig) produced this warning: > > kernel/time/timer.c: In function 'schedule_timeout': > kernel/time/timer.c:969:20: warning: 'timer.expires' may be used uninitialized in this function [-Wmaybe-uninitialized] > 969 | long diff = timer->expires - expires; > | ~~~~~^~~~~~~~~ > > Introduced by (bisected to) commit > > c4127fce1d02 ("timer: Use hlist_unhashed_lockless() in timer_pending()") > > x86_64-linux-gnu-gcc (Debian 9.2.1-21) 9.2.1 20191130 Well, if the timer is pending, then ->expires has to have been initialized, but off where the compiler cannot see it, such as during a previous call to __mod_timer(). And the change may have made it harder for the compiler to see all of these relationships, but... I don't see this warning with gcc version 7.4.0. Just out of curiosity, what are you running, Stephen? Eric, any thoughts for properly educating the compiler on this one? Thanx, Paul