mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
cgroup: make TRACE_CGROUP_PATH irq-safe
To use the TRACE_CGROUP_PATH() macro with css_set_lock locked, let's make the macro irq-safe. It's necessary in order to trace cgroup freezer state transitions (frozen/not frozen), which are happening with css_set_lock locked. Signed-off-by: Roman Gushchin <guro@fb.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
5313bfe425
commit
712e351787
@ -28,12 +28,15 @@ extern void __init enable_debug_cgroup(void);
|
||||
#define TRACE_CGROUP_PATH(type, cgrp, ...) \
|
||||
do { \
|
||||
if (trace_cgroup_##type##_enabled()) { \
|
||||
spin_lock(&trace_cgroup_path_lock); \
|
||||
unsigned long flags; \
|
||||
spin_lock_irqsave(&trace_cgroup_path_lock, \
|
||||
flags); \
|
||||
cgroup_path(cgrp, trace_cgroup_path, \
|
||||
TRACE_CGROUP_PATH_LEN); \
|
||||
trace_cgroup_##type(cgrp, trace_cgroup_path, \
|
||||
##__VA_ARGS__); \
|
||||
spin_unlock(&trace_cgroup_path_lock); \
|
||||
spin_unlock_irqrestore(&trace_cgroup_path_lock, \
|
||||
flags); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user