All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <kernel-6AxghH7DbtA@public.gmane.org>
To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Getting a process cgroup's path without sleeping
Date: Wed, 20 May 2015 15:51:31 +0300	[thread overview]
Message-ID: <555C8353.2090002@kyup.com> (raw)

Hello list,


I'm currently working on a modification to the kernel and I need to
query if the current is in the root cgroup or not. This can easily be
achieved by using task_cgroup_path, however it acquires cgroup_mutex
which can sleep. Unfortunately my usecase involves calling
task_cgroup_path in rcu read-side critical section and as you can
imagine this makes the RCU lock checking code to splat.

So my question is how to be able to safely get the cgroup path of the
current process (or any process) under rcu read side critical sections
e.g. not having to acquire the cgroup_mutex?


Regards,
Nikolay

                 reply	other threads:[~2015-05-20 12:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=555C8353.2090002@kyup.com \
    --to=kernel-6axghh7dbta@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.