qubes-linux-kernel/patches.suse/panic-on-io-nmi-SLE11-user-space-api.patch
2010-07-07 13:12:45 +02:00

48 lines
1.4 KiB
Diff

From: Kurt Garloff <garloff@suse.de>
Subject: API fix: [PATCH] X86: sysctl to allow panic on IOCK NMI error
References: bnc#427979
Patch-mainline: never
Part of patches.suse/panic-on-io-nmi.diff from SLE11 to keep stable user
space API. The rest is upstream as commit 5211a242.
Signed-off-by: Jiri Benc <jbenc@suse.cz>
---
include/linux/sysctl.h | 1 +
kernel/sysctl.c | 2 +-
kernel/sysctl_check.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -162,6 +162,7 @@ enum
KERN_MAX_LOCK_DEPTH=74,
KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
+ KERN_PANIC_ON_IO_NMI=79, /* int: whether we will panic on an io NMI */
};
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -808,7 +808,7 @@ static struct ctl_table kern_table[] = {
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_UNNUMBERED,
+ .ctl_name = KERN_PANIC_ON_IO_NMI,
.procname = "panic_on_io_nmi",
.data = &panic_on_io_nmi,
.maxlen = sizeof(int),
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -104,6 +104,7 @@ static const struct trans_ctl_table tran
{ KERN_MAX_LOCK_DEPTH, "max_lock_depth" },
{ KERN_NMI_WATCHDOG, "nmi_watchdog" },
{ KERN_PANIC_ON_NMI, "panic_on_unrecovered_nmi" },
+ { KERN_PANIC_ON_IO_NMI, "panic_on_io_nmi" },
{ KERN_SETUID_DUMPABLE, "suid_dumpable" },
{}
};