From: Alakesh Haloi <alakesh.haloi@gmail.com>
To: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Huang Ying <ying.huang@intel.com>,
Sasha Levin <alexander.levin@microsoft.com>,
Sandeep Patil <sspatil@android.com>
Subject: [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning
Date: Thu, 18 Apr 2019 01:20:12 +0000 [thread overview]
Message-ID: <20190418012012.GA4296@ip-172-31-25-235.us-west-2.compute.internal> (raw)
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;
^~~~~~~~
Cc: stable@vger.kernel.org # 4.14.x
Signed-off-by: Alakesh Haloi <alakesh.haloi@gmail.com>
---
fs/proc/task_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 5e63c459dc61..50fc311ee458 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -758,7 +758,7 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
};
int ret = 0;
bool rollup_mode;
- bool last_vma;
+ bool uninitialized_var(last_vma);
if (priv->rollup) {
rollup_mode = true;
--
2.17.2
next reply other threads:[~2019-04-18 1:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 1:20 Alakesh Haloi [this message]
2019-04-18 6:56 ` [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning 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
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=20190418012012.GA4296@ip-172-31-25-235.us-west-2.compute.internal \
--to=alakesh.haloi@gmail.com \
--cc=akpm@linux-foundation.org \
--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.