linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizefan@huawei.com>
To: Ming Lei <ming.lei@canonical.com>
Cc: Tejun Heo <tj@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: cgroup/next tree: reference to uninitialized percpu ref
Date: Mon, 19 Aug 2013 11:46:31 +0800	[thread overview]
Message-ID: <52119517.5010206@huawei.com> (raw)
In-Reply-To: <CACVXFVMV-A5FUU4VuXX0QvWP6jHDqu70QwRL53tJwVfxR589Pw@mail.gmail.com>

On 2013/8/19 11:32, Ming Lei wrote:
> Hi,
> 
> The kernel oops[1] is triggered during kernel boot with the latest next
> tree(3.11.0-rc5-next-20130816), looks it is caused by reference to uninitialized
> percpu ref of root cgroup, and below patch can fix the problem:
> 

Thanks for the report. Li Zhong has summited a patch to fix it:

www.spinics.net/lists/linux-next/msg26414.html

and it should show up in linux-next tree when next is updated.

> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 723194f..0e8954b 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -4485,7 +4485,8 @@ static long cgroup_create(struct cgroup *parent,
> struct dentry *dentry,
>   struct cgroup_subsys_state *css = css_ar[ss->subsys_id];
> 
>   dget(dentry);
> - percpu_ref_get(&css->parent->refcnt);
> + if (!(css->parent->flags & CSS_ROOT))
> + percpu_ref_get(&css->parent->refcnt);
>   }
> 



      reply	other threads:[~2013-08-19  3:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  3:32 cgroup/next tree: reference to uninitialized percpu ref Ming Lei
2013-08-19  3:46 ` Li Zefan [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=52119517.5010206@huawei.com \
    --to=lizefan@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.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;
as well as URLs for NNTP newsgroup(s).