From a903021435a22c55a28e470e342b5fce4de98738 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 9 Feb 2009 09:28:36 -0800 Subject: process.create: fix the new_pid read order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * process.stp (process.create): Read the task pid *after* the task pointer is checked for errors. This is to fix a problem reported on the mailing list: http://sources.redhat.com/ml/systemtap/2009-q1/msg00403.html CC: Luis Fernando Muñoz Mejías --- tapset/process.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tapset/process.stp') diff --git a/tapset/process.stp b/tapset/process.stp index b28a72cd..7aab9379 100644 --- a/tapset/process.stp +++ b/tapset/process.stp @@ -25,8 +25,8 @@ function _IS_ERR:long(ptr:long) %{ /* pure */ */ probe process.create = kernel.function("copy_process").return { task = $return - new_pid = task_pid(task) if (_IS_ERR(task)) next + new_pid = task_pid(task) } -- cgit