diff options
Diffstat (limited to 'kernel/cgroup.c')
| -rw-r--r-- | kernel/cgroup.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 29a7b2cc593e..469dd547770c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -3806,10 +3806,7 @@ static void *pidlist_allocate(int count) | |||
| 3806 | 3806 | ||
| 3807 | static void pidlist_free(void *p) | 3807 | static void pidlist_free(void *p) |
| 3808 | { | 3808 | { |
| 3809 | if (is_vmalloc_addr(p)) | 3809 | kvfree(p); |
| 3810 | vfree(p); | ||
| 3811 | else | ||
| 3812 | kfree(p); | ||
| 3813 | } | 3810 | } |
| 3814 | 3811 | ||
| 3815 | /* | 3812 | /* |
| @@ -4199,7 +4196,9 @@ static void *cgroup_pidlist_next(struct seq_file *s, void *v, loff_t *pos) | |||
| 4199 | 4196 | ||
| 4200 | static int cgroup_pidlist_show(struct seq_file *s, void *v) | 4197 | static int cgroup_pidlist_show(struct seq_file *s, void *v) |
| 4201 | { | 4198 | { |
| 4202 | return seq_printf(s, "%d\n", *(int *)v); | 4199 | seq_printf(s, "%d\n", *(int *)v); |
| 4200 | |||
| 4201 | return 0; | ||
| 4203 | } | 4202 | } |
| 4204 | 4203 | ||
| 4205 | static u64 cgroup_read_notify_on_release(struct cgroup_subsys_state *css, | 4204 | static u64 cgroup_read_notify_on_release(struct cgroup_subsys_state *css, |
| @@ -5040,6 +5039,9 @@ int __init cgroup_init(void) | |||
| 5040 | WARN_ON(cgroup_add_dfl_cftypes(ss, ss->dfl_cftypes)); | 5039 | WARN_ON(cgroup_add_dfl_cftypes(ss, ss->dfl_cftypes)); |
| 5041 | WARN_ON(cgroup_add_legacy_cftypes(ss, ss->legacy_cftypes)); | 5040 | WARN_ON(cgroup_add_legacy_cftypes(ss, ss->legacy_cftypes)); |
| 5042 | } | 5041 | } |
| 5042 | |||
| 5043 | if (ss->bind) | ||
| 5044 | ss->bind(init_css_set.subsys[ssid]); | ||
| 5043 | } | 5045 | } |
| 5044 | 5046 | ||
| 5045 | cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj); | 5047 | cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj); |
| @@ -5451,7 +5453,7 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry, | |||
| 5451 | struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss) | 5453 | struct 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 |
