[Devel] [patch] incorrect pid_ns check

Vasily Averin vvs at parallels.com
Fri Sep 19 04:07:25 PDT 2014


Dear Dave,

I've found that crash does not find all tasks on OpenVZ kernels.
Currently pid_ns check in refresh_hlist_task_table_v3() checks only first entry 
in pid_hash[i] hlist. If this entry is not related to init_pid_ns
it forget about other entries in hlist and switches to next element
in pid_hash array.

Attached patch fix this problem.

Thank you,
	Vasily Averin
-------------- next part --------------
diff -up crash-7.0.8/task.c.pidns crash-7.0.8/task.c
--- crash-7.0.8/task.c.pidns	2014-09-11 11:08:25.000000000 -0400
+++ crash-7.0.8/task.c	2014-09-19 06:15:42.000000000 -0400
@@ -2033,7 +2033,7 @@ do_chained:
 		 *  Use init_pid_ns level 0 (PIDTYPE_PID).
 		 */
 		if (upid_ns != tt->init_pid_ns)
-			continue;
+			goto chain_next;
 
 		pid = upid - OFFSET(pid_numbers);
 


More information about the Devel mailing list