This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix compilation errors for itrace probe point - v2


Maynard Johnson wrote:
Maynard Johnson wrote:
David Smith wrote:
Maynard Johnson wrote:
Hello,
I recently pulled down the systemtap src onto a Fedora 10 system and tried to use the itrace
probe point. The resulting kernel module failed to compile because
the runtime/itrace.c file
had not been updated to reflect the recent utrace interface changes.
This problem had not
been caught because the itrace test is currently disabled (since it
fails on x86_64).

I looked at your changes a bit.  In remove_usr_itrace_info(), you
probably need to ignore EALREADY (which means the DEATH callback has
already begun so there is no point in detaching).


[snip]
diff -paur systemtap-orig/runtime/itrace.c systemtap-fixes/runtime/itrace.c
--- systemtap-orig/runtime/itrace.c	2009-03-03 15:45:40.000000000 -0500
+++ systemtap-fixes/runtime/itrace.c	2009-03-03 15:49:14.000000000 -0500
@@ -1,6 +1,6 @@
@@ -232,7 +316,11 @@ void static remove_usr_itrace_info(struc

 	spin_lock(&itrace_lock);
 	if (ui->tsk && ui->engine) {
-		(void) utrace_detach(ui->tsk, ui->engine);
+		status = utrace_control(ui->tsk, ui->engine, UTRACE_DETACH);
+		if (status < 0 && ((status != -ESRCH) || (status != -EALREADY)))
+			printk(KERN_ERR
+			       "utrace_control(UTRACE_DETACH) returns %d\n",
+			       status);
 	}
[snip]
Stupid logic error.  The line above should be:
	if (status < 0 && status != -ESRCH && status != -EALREADY)

-Maynard




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]