]> sourceware.org Git - systemtap.git/commitdiff
PR16766 cont'd: tolerate STAP_SESSION_ERROR in module_refresh callback
authorFrank Ch. Eigler <fche@redhat.com>
Sun, 30 Mar 2014 12:17:23 +0000 (08:17 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sun, 30 Mar 2014 12:17:23 +0000 (08:17 -0400)
If a systemtap module is in error state (but not yet shut down via
message from stapio/staprun), it may harmlessly continue receiving
and processing module-notification callbacks.

translate.cxx

index 90b04d890524177a835564746bc44d11c4af67a2..5cb041bc6f5e2002f1e4befdc49f003546ccd5ad 100644 (file)
@@ -1885,7 +1885,7 @@ c_unparser::emit_module_refresh ()
   /* If we're not in STARTING/RUNNING state, don't try doing any work.
      PR16766 */
   o->newline() << "int state = atomic_read (session_state());";
-  o->newline() << "if (state != STAP_SESSION_RUNNING && state != STAP_SESSION_STARTING) {";
+  o->newline() << "if (state != STAP_SESSION_RUNNING && state != STAP_SESSION_STARTING && state != STAP_SESSION_ERROR) {";
   // cannot _stp_warn etc. since we're not in probe context
   o->newline(1) << "#if defined(__KERNEL__)";
   o->newline() << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
This page took 0.037112 seconds and 5 git commands to generate.