remove RESTARTABLE_PANICS option
This is done per request/suggestion from John Baldwin who introduced the option. Trying to resume normal system operation after a panic is very unpredictable and dangerous. It will become even more dangerous when we allow a thread in panic(9) to penetrate all lock contexts. I understand that the only purpose of this option was for testing scenarios potentially resulting in panic. Suggested by: jhb Reviewed by: attilio, jhb X-MFC-After: never Approved by: re (kib)
This commit is contained in:
parent
d716efa9f7
commit
7a0b13ed28
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224307
@ -498,16 +498,6 @@ options DIAGNOSTIC
|
||||
#
|
||||
options REGRESSION
|
||||
|
||||
#
|
||||
# RESTARTABLE_PANICS allows one to continue from a panic as if it were
|
||||
# a call to the debugger to continue from a panic as instead. It is only
|
||||
# useful if a kernel debugger is present. To restart from a panic, reset
|
||||
# the panicstr variable to NULL and continue execution. This option is
|
||||
# for development use only and should NOT be used in production systems
|
||||
# to "workaround" a panic.
|
||||
#
|
||||
#options RESTARTABLE_PANICS
|
||||
|
||||
#
|
||||
# This option lets some drivers co-exist that can't co-exist in a running
|
||||
# system. This is used to be able to compile all kernel code in one go for
|
||||
|
@ -579,7 +579,6 @@ LOCK_PROFILING opt_global.h
|
||||
LOCK_PROFILING_FAST opt_global.h
|
||||
MSIZE opt_global.h
|
||||
REGRESSION opt_global.h
|
||||
RESTARTABLE_PANICS opt_global.h
|
||||
RWLOCK_NOINLINE opt_global.h
|
||||
SX_NOINLINE opt_global.h
|
||||
VFS_BIO_DEBUG opt_global.h
|
||||
|
@ -585,15 +585,6 @@ panic(const char *fmt, ...)
|
||||
kdb_backtrace();
|
||||
if (debugger_on_panic)
|
||||
kdb_enter(KDB_WHY_PANIC, "panic");
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
/* See if the user aborted the panic, in which case we continue. */
|
||||
if (panicstr == NULL) {
|
||||
#ifdef SMP
|
||||
atomic_store_rel_int(&panic_cpu, NOCPU);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/*thread_lock(td); */
|
||||
td->td_flags |= TDF_INPANIC;
|
||||
|
@ -604,9 +604,6 @@ ng_ether_rcvdata(hook_p hook, item_p item)
|
||||
NG_FREE_ITEM(item);
|
||||
|
||||
panic("%s: weird hook", __func__);
|
||||
#ifdef RESTARTABLE_PANICS /* so we don't get an error msg in LINT */
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -404,9 +404,6 @@ ng_mppc_rcvdata(hook_p hook, item_p item)
|
||||
|
||||
/* Oops */
|
||||
panic("%s: unknown hook", __func__);
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
return (EINVAL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -374,9 +374,6 @@ ng_int8_unparse(const struct ng_parse_type *type,
|
||||
break;
|
||||
default:
|
||||
panic("%s: unknown type", __func__);
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
return(0);
|
||||
#endif
|
||||
}
|
||||
if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
|
||||
return (error);
|
||||
@ -473,9 +470,6 @@ ng_int16_unparse(const struct ng_parse_type *type,
|
||||
break;
|
||||
default:
|
||||
panic("%s: unknown type", __func__);
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
return(0);
|
||||
#endif
|
||||
}
|
||||
if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
|
||||
return (error);
|
||||
@ -575,9 +569,6 @@ ng_int32_unparse(const struct ng_parse_type *type,
|
||||
break;
|
||||
default:
|
||||
panic("%s: unknown type", __func__);
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
return(0);
|
||||
#endif
|
||||
}
|
||||
if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
|
||||
return (error);
|
||||
@ -673,9 +664,6 @@ ng_int64_unparse(const struct ng_parse_type *type,
|
||||
break;
|
||||
default:
|
||||
panic("%s: unknown type", __func__);
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
return(0);
|
||||
#endif
|
||||
}
|
||||
if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
|
||||
return (error);
|
||||
|
@ -160,11 +160,7 @@ void *hashinit_flags(int count, struct malloc_type *type,
|
||||
void *phashinit(int count, struct malloc_type *type, u_long *nentries);
|
||||
void g_waitidle(void);
|
||||
|
||||
#ifdef RESTARTABLE_PANICS
|
||||
void panic(const char *, ...) __printflike(1, 2);
|
||||
#else
|
||||
void panic(const char *, ...) __dead2 __printflike(1, 2);
|
||||
#endif
|
||||
|
||||
void cpu_boot(int);
|
||||
void cpu_flush_dcache(void *, size_t);
|
||||
|
Loading…
Reference in New Issue
Block a user