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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 0418BC43218 for ; Sat, 27 Apr 2019 15:06:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE552208CA for ; Sat, 27 Apr 2019 15:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556377569; bh=rLY3nKAfXXe3E/yxSChZGYTtSUl037CMmkf2olVIn60=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=SXk46+iGPj9yo6iB24385KHKynhDuNtV8v4HRokCoJl8/i9F7vmm5cE+nQlfxh8w0 q5bi48HFfHxlhG22vT+PxqbQEi8zybqo1q3nh0ZyBBvyPC8Tbcec8ssWxUxWPWMAca GK9xh+Hz0PAdSzpJO+CKFh/8J0IZaGDfK9yuZg8E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726050AbfD0PGJ (ORCPT ); Sat, 27 Apr 2019 11:06:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:56394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbfD0PGJ (ORCPT ); Sat, 27 Apr 2019 11:06:09 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 23F072087C; Sat, 27 Apr 2019 15:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556377568; bh=rLY3nKAfXXe3E/yxSChZGYTtSUl037CMmkf2olVIn60=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nIbOIrxhzH7SiR64fSWem7yULlHYhzefRCouuMr4tWGbBqDSO2ilwZOztDct/rdrm NRPdnThPYBXm9i7WnPHoPmk+1qq65NWeyAxa9vGOAG5FjZnxHD6gFRfXzosb2qzPDr rsmtFFKZxWnuXB+D4MraBydc62OfV/tJxK+UU9Ag= Date: Sat, 27 Apr 2019 11:06:06 -0400 From: Sasha Levin To: Greg Kroah-Hartman Cc: Alakesh Haloi , Andrew Morton , stable@vger.kernel.org, Vlastimil Babka , Huang Ying , Sasha Levin , Sandeep Patil Subject: Re: [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning Message-ID: <20190427150606.GF17719@sasha-vm> References: <20190418012012.GA4296@ip-172-31-25-235.us-west-2.compute.internal> <20190418153459.50ee6fbea2bb6041040cbeb5@linux-foundation.org> <20190425003419.GA10192@ip-172-31-29-54.us-west-2.compute.internal> <20190425064741.GA20123@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190425064741.GA20123@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Apr 25, 2019 at 08:47:41AM +0200, Greg Kroah-Hartman wrote: >On Thu, Apr 25, 2019 at 12:34:19AM +0000, Alakesh Haloi wrote: >> On Thu, Apr 18, 2019 at 03:34:59PM -0700, Andrew Morton wrote: >> > On Thu, 18 Apr 2019 01:20:12 +0000 Alakesh Haloi wrote: >> > >> > > This patch fixes the following uninitialized variable warning >> > > >> > > fs/proc/task_mmu.c: In function 'show_smap.isra.33': >> > > fs/proc/task_mmu.c:761:7: warning: 'last_vma' may be used uninitialized in this function [-Wmaybe-uninitialized] >> > > bool last_vma; >> > > ^~~~~~~~ >> > >> > I can't immediately find a kernel tree to which this is applicable. >> > What kernel are you patching? >> > >> This is for 4.14 stable tree. Corresponding commit does not exist in >> mainline as the code has changed. > >I suggest updating your compiler to a sane one, I do not see this >warning at all in the 4.14.y tree. I've reproduced this warning using gcc 7.3, it looks like gcc 8.2 is smart enough to understand that this is not actually an issue. It was "fixed" upstream with 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file") which rewrote most of the code in that area. Given that this is a harmless warning that isn't seen with newer compilers, I don't think it makes sense to do anything about it. I figured I'd send this mail out just to have a record of this issue in case it comes up again in the future. -- Thanks, Sasha