From: Jason Low <jason.low2@hp.com>
To: Tejun Heo <tj@kernel.org>, Li Zefan <lizefan@huawei.com>
Cc: linux-kernel@vger.kernel.org, aswin@hp.com,
Jason Low <jason.low2@hp.com>
Subject: [PATCH] cgroup: Initialize root in cgroup_mount
Date: Mon, 26 Jan 2015 16:21:39 -0800 [thread overview]
Message-ID: <1422318099.6710.3.camel@j-VirtualBox> (raw)
Compiling kernel/ causes warnings:
... ‘root’ may be used uninitialized in this function
... ‘root’ was declared here
This isn't an issue since there is already logic to not use
root if we goto out_unlock without setting root.
Explicitly initialize root to NULL to suppress this so that we can
focus on catching warnings that can potentially cause bigger issues.
Signed-off-by: Jason Low <jason.low2@hp.com>
---
kernel/cgroup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index bb263d0..66684f3 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1738,8 +1738,8 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type,
void *data)
{
struct super_block *pinned_sb = NULL;
+ struct cgroup_root *root = NULL;
struct cgroup_subsys *ss;
- struct cgroup_root *root;
struct cgroup_sb_opts opts;
struct dentry *dentry;
int ret;
--
1.7.1
next reply other threads:[~2015-01-27 0:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 0:21 Jason Low [this message]
2015-01-27 16:10 ` [PATCH] cgroup: Initialize root in cgroup_mount Tejun Heo
2015-01-27 17:46 ` Jason Low
2015-01-27 18:18 ` Tejun Heo
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=1422318099.6710.3.camel@j-VirtualBox \
--to=jason.low2@hp.com \
--cc=aswin@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox