summaryrefslogtreecommitdiffstats
path: root/tapset/process.stp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-02-09 09:28:36 -0800
committerJosh Stone <jistone@redhat.com>2009-02-09 09:44:55 -0800
commita903021435a22c55a28e470e342b5fce4de98738 (patch)
tree5752e318116bf9cfba4a879619223e10e78b7698 /tapset/process.stp
parent22f971e83eddada009053d964a397550807b9b50 (diff)
downloadsystemtap-steved-a903021435a22c55a28e470e342b5fce4de98738.tar.gz
systemtap-steved-a903021435a22c55a28e470e342b5fce4de98738.tar.xz
systemtap-steved-a903021435a22c55a28e470e342b5fce4de98738.zip
process.create: fix the new_pid read order
* 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 <Luis.Fernando.Munoz.Mejias@cern.ch>
Diffstat (limited to 'tapset/process.stp')
-rw-r--r--tapset/process.stp2
1 files changed, 1 insertions, 1 deletions
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)
}