[lkml]   [2011]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectBUG: cgroup_task_counter subsys may crash with whole-threadgroup move
I was testing some patches for cgroup_attach_proc and managed to cause a
crash with the following usage pattern:

mount -t cgroup none -o tasks /dev/cgroup
cd /dev/cgroup
mkdir foo
echo $PID > foo/cgroup.procs
echo $PID > tasks
echo $PID > foo/cgroup.procs

Where $PID is the thread ID of a member of a multithreaded process (my
test program just does CLONE_THREAD 8 times and then all threads sleep).
(It doesn't matter if the thread is the group leader or not, but a
single-threaded process doesn't crash.)

And get the following kernel panic:

It's deterministic, and happens only when the "tasks" subsystem is

I'm using user-mode linux to test, with the following config:

and I ran it in GDB to get the following backtrace:


 \ /
  Last update: 2011-10-14 02:11    [W:0.034 / U:16.612 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site