All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alakesh Haloi <alakesh.haloi@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@vger.kernel.org, Vlastimil Babka <vbabka@suse.cz>,
	Huang Ying <ying.huang@intel.com>,
	Sasha Levin <alexander.levin@microsoft.com>,
	Sandeep Patil <sspatil@android.com>
Subject: Re: [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning
Date: Sat, 27 Apr 2019 11:06:06 -0400	[thread overview]
Message-ID: <20190427150606.GF17719@sasha-vm> (raw)
In-Reply-To: <20190425064741.GA20123@kroah.com>

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 <alakesh.haloi@gmail.com> 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

      reply	other threads:[~2019-04-27 15:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18  1:20 [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning Alakesh Haloi
2019-04-18  6:56 ` Greg Kroah-Hartman
2019-04-18 22:34 ` Andrew Morton
2019-04-25  0:34   ` Alakesh Haloi
2019-04-25  6:47     ` Greg Kroah-Hartman
2019-04-27 15:06       ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190427150606.GF17719@sasha-vm \
    --to=sashal@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alakesh.haloi@gmail.com \
    --cc=alexander.levin@microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=sspatil@android.com \
    --cc=stable@vger.kernel.org \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.