aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index a220fdb66568..469dd547770c 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4196,7 +4196,9 @@ static void *cgroup_pidlist_next(struct seq_file *s, void *v, loff_t *pos)
4196 4196
4197static int cgroup_pidlist_show(struct seq_file *s, void *v) 4197static int cgroup_pidlist_show(struct seq_file *s, void *v)
4198{ 4198{
4199 return seq_printf(s, "%d\n", *(int *)v); 4199 seq_printf(s, "%d\n", *(int *)v);
4200
4201 return 0;
4200} 4202}
4201 4203
4202static u64 cgroup_read_notify_on_release(struct cgroup_subsys_state *css, 4204static u64 cgroup_read_notify_on_release(struct cgroup_subsys_state *css,
@@ -5451,7 +5453,7 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry,
5451struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss) 5453struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss)
5452{ 5454{
5453 WARN_ON_ONCE(!rcu_read_lock_held()); 5455 WARN_ON_ONCE(!rcu_read_lock_held());
5454 return idr_find(&ss->css_idr, id); 5456 return id > 0 ? idr_find(&ss->css_idr, id) : NULL;
5455} 5457}
5456 5458
5457#ifdef CONFIG_CGROUP_DEBUG 5459#ifdef CONFIG_CGROUP_DEBUG