From: Dan Carpenter <dan.carpenter@oracle.com>
To: mkoutny@suse.com
Cc: Tejun Heo <tj@kernel.org>, kernel-janitors@vger.kernel.org
Subject: [bug report] cgroup: Honor caller's cgroup NS when resolving path
Date: Wed, 31 Aug 2022 10:08:09 +0300 [thread overview]
Message-ID: <Yw8I2ef6OvlMaGEF@kili> (raw)
Hello Michal Koutný,
The patch 74e4b956eb1c: "cgroup: Honor caller's cgroup NS when
resolving path" from Aug 26, 2022, leads to the following Smatch
static checker warning:
./include/linux/kernfs.h:600 kernfs_walk_and_get()
warn: sleeping in atomic context
kernel/cgroup/cgroup.c
6639 struct cgroup *cgroup_get_from_path(const char *path)
6640 {
6641 struct kernfs_node *kn;
6642 struct cgroup *cgrp = ERR_PTR(-ENOENT);
6643 struct cgroup *root_cgrp;
6644
6645 spin_lock_irq(&css_set_lock);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6646 root_cgrp = current_cgns_cgroup_from_root(&cgrp_dfl_root);
6647 kn = kernfs_walk_and_get(root_cgrp->kn, path);
^^^^^^^^^^^^^^^^^^^
The kernfs_walk_and_get() function calls down_read() (a semaphore) so
it can't be called while holding a spinlock.
6648 spin_unlock_irq(&css_set_lock);
6649 if (!kn)
6650 goto out;
regards,
dan carpenter
next reply other threads:[~2022-08-31 7:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 7:08 Dan Carpenter [this message]
2022-08-31 9:00 ` [bug report] cgroup: Honor caller's cgroup NS when resolving path Michal Koutný
2022-08-31 10:07 ` Dan Carpenter
2022-09-04 19:40 ` 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=Yw8I2ef6OvlMaGEF@kili \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=mkoutny@suse.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 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.