Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jul 2011 09:12:49 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224307 - in head/sys: conf kern netgraph sys
Message-ID:  <201107250912.p6P9Cn0m046298@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon Jul 25 09:12:48 2011
New Revision: 224307
URL: http://svn.freebsd.org/changeset/base/224307

Log:
  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)

Modified:
  head/sys/conf/NOTES
  head/sys/conf/options
  head/sys/kern/kern_shutdown.c
  head/sys/netgraph/ng_ether.c
  head/sys/netgraph/ng_mppc.c
  head/sys/netgraph/ng_parse.c
  head/sys/sys/systm.h

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/conf/NOTES	Mon Jul 25 09:12:48 2011	(r224307)
@@ -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

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/conf/options	Mon Jul 25 09:12:48 2011	(r224307)
@@ -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

Modified: head/sys/kern/kern_shutdown.c
==============================================================================
--- head/sys/kern/kern_shutdown.c	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/kern/kern_shutdown.c	Mon Jul 25 09:12:48 2011	(r224307)
@@ -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;

Modified: head/sys/netgraph/ng_ether.c
==============================================================================
--- head/sys/netgraph/ng_ether.c	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/netgraph/ng_ether.c	Mon Jul 25 09:12:48 2011	(r224307)
@@ -604,9 +604,6 @@ ng_ether_rcvdata(hook_p hook, item_p ite
 	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
 }
 
 /*

Modified: head/sys/netgraph/ng_mppc.c
==============================================================================
--- head/sys/netgraph/ng_mppc.c	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/netgraph/ng_mppc.c	Mon Jul 25 09:12:48 2011	(r224307)
@@ -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
 }
 
 /*

Modified: head/sys/netgraph/ng_parse.c
==============================================================================
--- head/sys/netgraph/ng_parse.c	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/netgraph/ng_parse.c	Mon Jul 25 09:12:48 2011	(r224307)
@@ -374,9 +374,6 @@ ng_int8_unparse(const struct ng_parse_ty
 		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_t
 		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_t
 		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_t
 		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);

Modified: head/sys/sys/systm.h
==============================================================================
--- head/sys/sys/systm.h	Mon Jul 25 07:45:22 2011	(r224306)
+++ head/sys/sys/systm.h	Mon Jul 25 09:12:48 2011	(r224307)
@@ -160,11 +160,7 @@ void	*hashinit_flags(int count, struct m
 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107250912.p6P9Cn0m046298>