summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2011-07-25 09:12:48 +0000
committeravg <avg@FreeBSD.org>2011-07-25 09:12:48 +0000
commit50b05401d3190631fb48430b4c0b48789f259b8d (patch)
treeff97ee9903ea140928fcd9303e0d93873d3c2d2e
parentffeefed9fc8fa85d3fcbd19640ba38e51e2ff4da (diff)
downloadFreeBSD-src-50b05401d3190631fb48430b4c0b48789f259b8d.zip
FreeBSD-src-50b05401d3190631fb48430b4c0b48789f259b8d.tar.gz
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)
-rw-r--r--sys/conf/NOTES10
-rw-r--r--sys/conf/options1
-rw-r--r--sys/kern/kern_shutdown.c9
-rw-r--r--sys/netgraph/ng_ether.c3
-rw-r--r--sys/netgraph/ng_mppc.c3
-rw-r--r--sys/netgraph/ng_parse.c12
-rw-r--r--sys/sys/systm.h4
7 files changed, 0 insertions, 42 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 0753c1d..4a9ec35 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -499,16 +499,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
# quality assurance purposes (like this file, which the option takes it name
diff --git a/sys/conf/options b/sys/conf/options
index b8f9958..f7026c1 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -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
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 60e854f..7621b15 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -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;
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index afedaa3..15e8b2d 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -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
}
/*
diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c
index 75194e8..cb65316 100644
--- a/sys/netgraph/ng_mppc.c
+++ b/sys/netgraph/ng_mppc.c
@@ -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
}
/*
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c
index 1215df1..fbbefc6 100644
--- a/sys/netgraph/ng_parse.c
+++ b/sys/netgraph/ng_parse.c
@@ -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);
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 8b0de57..7e537ee 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -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);
OpenPOWER on IntegriCloud