diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-07-13 11:47:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-07-13 11:47:01 -0700 |
commit | d0b97f3891fb414bd1fd1cb3d83f0f6b9fd0d357 (patch) | |
tree | 1e108a978d9646f09bb83675f92abd5f01f0f8ab /include | |
parent | 5750676b64a561f7ec920d7c6ba130fc9c7378f3 (diff) | |
parent | 07fd5b6cdf3cc30bfde8fe0f644771688be04447 (diff) |
Merge tag 'cgroup-for-5.19-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fix from Tejun Heo:
"Fix an old and subtle bug in the migration path.
css_sets are used to track tasks and migrations are tasks moving from
a group of css_sets to another group of css_sets. The migration path
pins all source and destination css_sets in the prep stage.
Unfortunately, it was overloading the same list_head entry to track
sources and destinations, which got confused for migrations which are
partially identity leading to use-after-frees.
Fixed by using dedicated list_heads for tracking sources and
destinations"
* tag 'cgroup-for-5.19-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: Use separate src/dst nodes when preloading css_sets for migration
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup-defs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 1bfcfb1af352..d4427d0a0e18 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -264,7 +264,8 @@ struct css_set { * List of csets participating in the on-going migration either as * source or destination. Protected by cgroup_mutex. */ - struct list_head mg_preload_node; + struct list_head mg_src_preload_node; + struct list_head mg_dst_preload_node; struct list_head mg_node; /* |