]> sourceware.org Git - systemtap.git/commitdiff
Don't fail vma tracking mmap callback if module is already known.
authorSultan Alsawaf <sultan@openresty.com>
Mon, 12 Jul 2021 20:01:57 +0000 (16:01 -0400)
committerStan Cox <scox@redhat.com>
Mon, 12 Jul 2021 20:01:57 +0000 (16:01 -0400)
An -EEXIST returned by stap_add_vma_map_info() just indicates that the
module is currently in stap's vma cache; it isn't a real issue. Calling
_stp_error() when this occurs causes stap to exit when there isn't a
real bug. Ignore the -EEXIST error to avoid breakage.

runtime/vma.c

index 048f31d8e614a923e7703cc54050fcadf4e4f29d..eae4d779e315b32b603558d9eb0aac42c12b4fe5 100644 (file)
@@ -199,7 +199,7 @@ static int _stp_vma_mmap_cb(struct stap_task_finder_target *tgt,
                          /* VMA entries are allocated dynamically, this is fine,
                           * since we are in a task_finder callback, which is in
                           * user context. */
-                         if (res != 0) {
+                         if (res != 0 && res != -EEXIST) {
                                _stp_error ("Couldn't register module '%s' for pid %d (%d)\n", _stp_modules[i]->path, tsk->group_leader->pid, res);
                          }
                          return 0;
This page took 0.028093 seconds and 5 git commands to generate.