diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index c556ed9db13d82a4bd7dcff1bb599dce6abd8341..8e0dd254eb11cf3d9f503c7bda32bcb3e75ba09d 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -46,7 +46,7 @@ #include /* Whether we react on sysrq keys or just ignore them */ -static int __read_mostly sysrq_enabled = 1; +static int __read_mostly sysrq_enabled = SYSRQ_DEFAULT_ENABLE; static bool __read_mostly sysrq_always_enabled; static bool sysrq_on(void) diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 387fa7d05c982b758942f83395e328949324fc1a..7faf933cced7018657d2212d543530484ce17ec9 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -17,6 +17,9 @@ #include #include +/* Enable/disable SYSRQ support by default (0==no, 1==yes). */ +#define SYSRQ_DEFAULT_ENABLE 1 + /* Possible values of bitmask for enabling sysrq functions */ /* 0x0001 is reserved for enable everything */ #define SYSRQ_ENABLE_LOG 0x0002 diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c33a1edb799fda6db2e16fdf9d1d0401a9f78278..3afce4dc9ba5519c88647335320205e4eb271f15 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -169,7 +169,8 @@ static int proc_taint(struct ctl_table *table, int write, #endif #ifdef CONFIG_MAGIC_SYSRQ -static int __sysrq_enabled; /* Note: sysrq code ises it's own private copy */ +/* Note: sysrq code uses it's own private copy */ +static int __sysrq_enabled = SYSRQ_DEFAULT_ENABLE; static int sysrq_sysctl_handler(ctl_table *table, int write, void __user *buffer, size_t *lenp,