mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] cgroups: fix lockdep subclasses overflow
Date: Wed, 4 Feb 2009 07:48:42 -0800	[thread overview]
Message-ID: <6599ad830902040748u58c7afcasc4152175aa382a2b@mail.gmail.com> (raw)
In-Reply-To: <49895BD7.8090405@cn.fujitsu.com>

On Wed, Feb 4, 2009 at 1:11 AM, Li Zefan <lizf@cn.fujitsu.com> wrote:
>
> This patch uses different lockdep keys for different subsystems.
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

Acked-by: Paul Menage <menage@google.com>

Looks good, thanks.

Paul

> ---
>  include/linux/cgroup.h |    1 +
>  kernel/cgroup.c        |    3 ++-
>  2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
> index e4e8e11..499900d 100644
> --- a/include/linux/cgroup.h
> +++ b/include/linux/cgroup.h
> @@ -378,6 +378,7 @@ struct cgroup_subsys {
>         * - initiating hotplug events
>         */
>        struct mutex hierarchy_mutex;
> +       struct lock_class_key subsys_key;
>
>        /*
>         * Link to parent, and list entry in parent's children.
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 5a54ff4..e14db9c 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -2351,7 +2351,7 @@ static void cgroup_lock_hierarchy(struct cgroupfs_root *root)
>        for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
>                struct cgroup_subsys *ss = subsys[i];
>                if (ss->root == root)
> -                       mutex_lock_nested(&ss->hierarchy_mutex, i);
> +                       mutex_lock(&ss->hierarchy_mutex);
>        }
>  }
>
> @@ -2637,6 +2637,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
>        BUG_ON(!list_empty(&init_task.tasks));
>
>        mutex_init(&ss->hierarchy_mutex);
> +       lockdep_set_class(&ss->hierarchy_mutex, &ss->subsys_key);
>        ss->active = 1;
>  }
>
> --
> 1.5.4.rc3
>
>
>
>

      parent reply	other threads:[~2009-02-04 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04  9:11 Li Zefan
2009-02-04  9:15 ` Li Zefan
2009-02-04 15:48 ` Paul Menage [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=6599ad830902040748u58c7afcasc4152175aa382a2b@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®