public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Bad Reference Semantics in PIDs Controller.
@ 2015-08-23 12:24 Aleksa Sarai
  2015-08-23 13:10 ` [PATCH 0/2] cgroup: pids: fix invalid reference semantics Aleksa Sarai
  0 siblings, 1 reply; 9+ messages in thread
From: Aleksa Sarai @ 2015-08-23 12:24 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	cgroups-u79uwXL29TY76Z2rM5mHXA

It turns out that, actually, the can_attach(), cancel_attach() and
attach() code is broken -- we're incrementing a ref on the old_css of
a task in can_attach(). Then we decrement the ref on a *different* css
(because the task has been migrated). This is clearly a bad thing.
Should we make cgroup_migrate() deal with the accounting for us (by
getting it to grab a ref before can_attach() and dropping it after the
attach succeeds or fails?).

-- 
Aleksa Sarai (cyphar)
www.cyphar.com

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

end of thread, other threads:[~2015-08-25 18:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-23 12:24 Bad Reference Semantics in PIDs Controller Aleksa Sarai
2015-08-23 13:10 ` [PATCH 0/2] cgroup: pids: fix invalid reference semantics Aleksa Sarai
     [not found]   ` <1440335432-4202-1-git-send-email-cyphar-gVpy/LI/lHzQT0dZR+AlfA@public.gmane.org>
2015-08-23 13:10     ` [PATCH 1/2] cgroup: get a ref to source csses when migrating Aleksa Sarai
     [not found]       ` <1440335432-4202-2-git-send-email-cyphar-gVpy/LI/lHzQT0dZR+AlfA@public.gmane.org>
2015-08-24 18:45         ` Tejun Heo
     [not found]           ` <20150824184507.GB28944-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-08-25  2:00             ` Aleksa Sarai
2015-08-25 18:14               ` Tejun Heo
2015-08-23 13:10   ` [PATCH 2/2] cgroup: pids: fix invalid get/put usage Aleksa Sarai
2015-08-24 19:00     ` Tejun Heo
2015-08-23 13:13   ` [PATCH 0/2] cgroup: pids: fix invalid reference semantics Aleksa Sarai

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