X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=libcfs%2Flibcfs%2Flinux%2Flinux-debug.c;h=4d0f4dfa64c0860e0b500725b65c2d8cbf3f1885;hp=3417631530d718e9a2ee7851ab63b64bf710214a;hb=d38d331fa6525ffc02665f48fa52f94626360631;hpb=f5fb215365791507ec98796ea624abeafa31901c diff --git a/libcfs/libcfs/linux/linux-debug.c b/libcfs/libcfs/linux/linux-debug.c index 3417631..4d0f4df 100644 --- a/libcfs/libcfs/linux/linux-debug.c +++ b/libcfs/libcfs/linux/linux-debug.c @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Whamcloud, Inc. + * Copyright (c) 2012, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -38,9 +38,6 @@ * Author: Phil Schwan */ -#ifndef AUTOCONF_INCLUDED -#include -#endif #include #include #include @@ -54,7 +51,6 @@ #endif #include #include -#include #include #include @@ -98,7 +94,7 @@ void libcfs_run_debug_log_upcall(char *file) argv[2] = NULL; - rc = USERMODEHELPER(argv[0], argv, envp); + rc = call_usermodehelper(argv[0], argv, envp, 1); if (rc < 0 && rc != -ENOENT) { CERROR("Error %d invoking LNET debug log upcall %s %s; " "check /proc/sys/lnet/debug_log_upcall\n", @@ -128,7 +124,7 @@ void libcfs_run_upcall(char **argv) LASSERT(argc >= 2); - rc = USERMODEHELPER(argv[0], argv, envp); + rc = call_usermodehelper(argv[0], argv, envp, 1); if (rc < 0 && rc != -ENOENT) { CERROR("Error %d invoking LNET upcall %s %s%s%s%s%s%s%s%s; " "check /proc/sys/lnet/upcall\n", @@ -164,18 +160,6 @@ void libcfs_run_lbug_upcall(struct libcfs_debug_msg_data *msgdata) libcfs_run_upcall (argv); } -#ifdef __arch_um__ -void lbug_with_loc(struct libcfs_debug_msg_data *msgdata) -{ - libcfs_catastrophe = 1; - libcfs_debug_msg(msgdata, "LBUG - trying to dump log to %s\n", - libcfs_debug_file_path); - libcfs_debug_dumplog(); - libcfs_run_lbug_upcall(msgdata); - asm("int $3"); - panic("LBUG"); -} -#else /* coverity[+kill] */ void lbug_with_loc(struct libcfs_debug_msg_data *msgdata) { @@ -197,7 +181,6 @@ void lbug_with_loc(struct libcfs_debug_msg_data *msgdata) while (1) schedule(); } -#endif /* __arch_um__ */ #ifdef __KERNEL__ @@ -258,12 +241,7 @@ static DUMP_TRACE_CONST struct stacktrace_ops print_trace_ops = { void libcfs_debug_dumpstack(struct task_struct *tsk) { -#if defined(__arch_um__) - if (tsk != NULL) - CWARN("stack dump for pid %d (%d) requested; wake up gdb.\n", - tsk->pid, UML_PID(tsk)); - //asm("int $3"); -#elif defined(HAVE_DUMP_TRACE) +#if defined(HAVE_DUMP_TRACE) /* dump_stack() */ /* show_trace() */ if (tsk == NULL)