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:
@@ -238,7 +238,7 @@ struct css_set {
|
||||
* Lists running through all tasks using this cgroup group.
|
||||
* mg_tasks lists tasks which belong to this cset but are in the
|
||||
* process of being migrated out or in. Protected by
|
||||
* css_set_rwsem, but, during migration, once tasks are moved to
|
||||
* css_set_lock, but, during migration, once tasks are moved to
|
||||
* mg_tasks, it can be read safely while holding cgroup_mutex.
|
||||
*/
|
||||
struct list_head tasks;
|
||||
|
||||
@@ -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