public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] cgroup_subsys_state lifecycle fixups
@ 2022-05-25 15:15 Michal Koutný
       [not found] ` <20220525151517.8430-1-mkoutny-IBi9RG/b67k@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Michal Koutný @ 2022-05-25 15:15 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Tejun Heo, Zefan Li, Johannes Weiner, Bui Quang Minh,
	Tadeusz Struk

Two corner cases were hanging around [2][3] related to css lifecycles,
since they're loosely related I'm sending them together.

The 2nd patch fixes problems encountered in syzbot tests only.
Alternative solutions could be:
- daisy-chain css_release_work_fn from the offending css_killed_work_fn call,
- rework kill_css() not to rely on multi-stage css_killed_work_fn() [1].

The simplest approach was chosen.

The other existing users of percpu_ref_kill_and_confirm are not affected by
similar issues.

[1] Rough idea is to only synchronize via a completion like e.g.
nvmet_sq_destroy() does and move most of css_killed_work_fn() at the end of
kill_css(). kill_css() is only used in process context when de-configuring
controllers or rmdiring a cgroup.

[2] https://lore.kernel.org/lkml/20220404142535.145975-1-minhquangbui99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
[3] https://lore.kernel.org/lkml/20220412192459.227740-1-tadeusz.struk-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org/

Michal Koutn√Ω (2):
  cgroup: Wait for cgroup_subsys_state offlining on unmount
  cgroup: Use separate work structs on css release path

 include/linux/cgroup-defs.h |  5 +++--
 kernel/cgroup/cgroup.c      | 19 +++++++++++--------
 2 files changed, 14 insertions(+), 10 deletions(-)

-- 
2.35.3


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-06-02 14:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-25 15:15 [PATCH 0/2] cgroup_subsys_state lifecycle fixups Michal Koutný
     [not found] ` <20220525151517.8430-1-mkoutny-IBi9RG/b67k@public.gmane.org>
2022-05-25 15:15   ` [PATCH 1/2] cgroup: Wait for cgroup_subsys_state offlining on unmount Michal Koutný
2022-05-25 15:15   ` [PATCH 2/2] cgroup: Use separate work structs on css release path Michal Koutný
     [not found]     ` <20220525151517.8430-3-mkoutny-IBi9RG/b67k@public.gmane.org>
2022-05-25 16:14       ` Michal Koutný
     [not found]         ` <20220525161455.GA16134-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-05-26  9:56           ` Michal Koutný
2022-05-26 18:15             ` Tejun Heo
     [not found]               ` <Yo/DtjEU/kYr190u-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-05-27 16:39                 ` Tadeusz Struk
     [not found]                   ` <904ef8af-13a5-e566-b760-74519f70fa62-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2022-05-27 16:54                     ` Michal Koutný
     [not found]                       ` <20220527165429.GJ11007-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-05-27 17:23                         ` Tejun Heo
2022-06-01 23:13                 ` Tadeusz Struk
     [not found]                   ` <0babd7df-bdef-9edc-3682-1144bc0c2d2b-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2022-06-01 23:20                     ` Tejun Heo
     [not found]                       ` <Ypf0VnKUMiuRgZqT-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-06-01 23:37                         ` Tadeusz Struk
     [not found]                           ` <1fb4d8d7-ccc0-b020-715e-38c2dfd94c23-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2022-06-01 23:43                             ` Tejun Heo
     [not found]                               ` <Ypf5jpI7dSmpi4W0-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-06-02  0:00                                 ` Tadeusz Struk
     [not found]                                   ` <c3bd8e63-7204-f86d-8efa-254db71185fc-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2022-06-02  0:07                                     ` Tejun Heo
     [not found]                                       ` <Ypf/MpwzByOrSp6A-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-06-02  0:26                                         ` Tadeusz Struk
     [not found]                                           ` <416dc60a-f0e5-7d05-1613-3cd0ca415768-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2022-06-02  0:29                                             ` Tejun Heo
     [not found]                                               ` <YpgEY/lJbLidLOhc-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-06-02  0:40                                                 ` Tadeusz Struk
     [not found]                                                   ` <0fd1c3fd-fa86-dbed-f3f0-74c91b1efa11-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2022-06-02 11:47                                                     ` Michal Koutný
     [not found]                                                       ` <20220602114705.GB21320-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-06-02 14:28                                                         ` Tadeusz Struk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox