aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-07-12 17:55:40 +0200
committerArnd Bergmann <arnd@arndb.de>2012-07-12 17:55:40 +0200
commit9c63cd5a955ce8a3de1776a9e4b6b89c69b2a09e (patch)
tree2b628ebdaeb63603d90c92e78bc5dd668856b61d /lib
parentMerge branch 'for-3.6/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/defconfig (diff)
parentARM: imx_v4_v5_defconfig: update features (diff)
downloadlinux-dev-9c63cd5a955ce8a3de1776a9e4b6b89c69b2a09e.tar.xz
linux-dev-9c63cd5a955ce8a3de1776a9e4b6b89c69b2a09e.zip
Merge tag 'imx-defconfig' of git://git.pengutronix.de/git/imx/linux-2.6 into next/defconfig
From Sascha Hauer <s.hauer@pengutronix.de>: ARM i.MX defconfig updates for v3.6 * tag 'imx-defconfig' of git://git.pengutronix.de/git/imx/linux-2.6: ARM: imx_v4_v5_defconfig: update features ARM: imx_v6_v7_defconfig: update features Includes an update to v3.5-rc5 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug20
-rw-r--r--lib/fault-inject.c4
-rw-r--r--lib/spinlock_debug.c2
3 files changed, 25 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a42d3ae39648..ff5bdee4716d 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -241,6 +241,26 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
+config PANIC_ON_OOPS
+ bool "Panic on Oops" if EXPERT
+ default n
+ help
+ Say Y here to enable the kernel to panic when it oopses. This
+ has the same effect as setting oops=panic on the kernel command
+ line.
+
+ This feature is useful to ensure that the kernel does not do
+ anything erroneous after an oops which could result in data
+ corruption or other issues.
+
+ Say N if unsure.
+
+config PANIC_ON_OOPS_VALUE
+ int
+ range 0 1
+ default 0 if !PANIC_ON_OOPS
+ default 1 if PANIC_ON_OOPS
+
config DETECT_HUNG_TASK
bool "Detect Hung Tasks"
depends on DEBUG_KERNEL
diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index 6805453c18e7..f7210ad6cffd 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -101,6 +101,10 @@ static inline bool fail_stacktrace(struct fault_attr *attr)
bool should_fail(struct fault_attr *attr, ssize_t size)
{
+ /* No need to check any other properties if the probability is 0 */
+ if (attr->probability == 0)
+ return false;
+
if (attr->task_filter && !fail_task(attr, current))
return false;
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index d0ec4f3d1593..e91fbc23fff1 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -118,7 +118,7 @@ static void __spin_lock_debug(raw_spinlock_t *lock)
/* lockup suspected: */
if (print_once) {
print_once = 0;
- spin_dump(lock, "lockup");
+ spin_dump(lock, "lockup suspected");
#ifdef CONFIG_SMP
trigger_all_cpu_backtrace();
#endif