X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Fsvmtool.c;h=643b484bdf5ae5151417763422e2438b8dfe6095;hb=39e9428b9;hp=01ae42213712ce924be3ca7384ce8429caaaf52b;hpb=7bee80c823ca77de3aca803fdede77e4c7385a52;p=vpp.git diff --git a/src/svm/svmtool.c b/src/svm/svmtool.c index 01ae4221371..643b484bdf5 100644 --- a/src/svm/svmtool.c +++ b/src/svm/svmtool.c @@ -190,7 +190,7 @@ svm_map_region_nolock (svm_map_region_args_t * a) { clib_warning ("rp->mutex LOCKED by pid %d, tag %d, cleared...", rp->mutex_owner_pid, rp->mutex_owner_tag); - memset (&rp->mutex, 0, sizeof (rp->mutex)); + clib_memset (&rp->mutex, 0, sizeof (rp->mutex)); } else @@ -339,7 +339,7 @@ subregion_repair (char *chroot_path) for (i = 0; i < vec_len (svm_names); i++) { - memset (&a, 0, sizeof (a)); + clib_memset (&a, 0, sizeof (a)); a.root_path = chroot_path; a.name = (char *) svm_names[i]; fformat (stdout, "Checking %s region...\n", a.name); @@ -368,7 +368,7 @@ repair (char *chroot_path, int crash_root_region) a->root_path = chroot_path; a->name = SVM_GLOBAL_REGION_NAME; - a->baseva = SVM_GLOBAL_REGION_BASEVA; + a->baseva = svm_get_global_region_base_va (); a->size = SVM_GLOBAL_REGION_SIZE; a->flags = SVM_FLAGS_NODATA; @@ -422,7 +422,7 @@ repair (char *chroot_path, int crash_root_region) { clib_warning ("root_rp->mutex LOCKED by pid %d, tag %d, cleared...", root_rp->mutex_owner_pid, root_rp->mutex_owner_tag); - memset (&root_rp->mutex, 0, sizeof (root_rp->mutex)); + clib_memset (&root_rp->mutex, 0, sizeof (root_rp->mutex)); goto out; } else @@ -458,6 +458,8 @@ main (int argc, char **argv) char *chroot_path = 0; u8 *chroot_u8; + clib_mem_init_thread_safe (0, 128 << 20); + unformat_init_command_line (&input, argv); while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT)