All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] cgroup: Honor caller's cgroup NS when resolving path
@ 2022-08-31  7:08 Dan Carpenter
  2022-08-31  9:00 ` Michal Koutný
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2022-08-31  7:08 UTC (permalink / raw)
  To: mkoutny; +Cc: Tejun Heo, kernel-janitors

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-04 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31  7:08 [bug report] cgroup: Honor caller's cgroup NS when resolving path Dan Carpenter
2022-08-31  9:00 ` Michal Koutný
2022-08-31 10:07   ` Dan Carpenter
2022-09-04 19:40   ` Tejun Heo

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.