mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
Merge tag 'cgroup-for-6.6-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo: - In cgroup1, the `tasks` file could have duplicate pids which can trigger a warning in seq_file. Fix it by removing duplicate items after sorting - Comment update * tag 'cgroup-for-6.6-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Fix incorrect css_set_rwsem reference in comment cgroup: Remove duplicates in cgroup v1 tasks file
This commit is contained in:
@@ -360,10 +360,9 @@ static int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type,
|
||||
}
|
||||
css_task_iter_end(&it);
|
||||
length = n;
|
||||
/* now sort & (if procs) strip out duplicates */
|
||||
/* now sort & strip out duplicates (tgids or recycled thread PIDs) */
|
||||
sort(array, length, sizeof(pid_t), cmppid, NULL);
|
||||
if (type == CGROUP_FILE_PROCS)
|
||||
length = pidlist_uniq(array, length);
|
||||
length = pidlist_uniq(array, length);
|
||||
|
||||
l = cgroup_pidlist_find_create(cgrp, type);
|
||||
if (!l) {
|
||||
|
||||
Reference in New Issue
Block a user