Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sysrq: add enable_mask in sysrq_moom_op

It is written in the Documentation/sysrq.txt that oom-killer is enabled
when we set "64" in /proc/sys/kernel/sysrq:

<Documentation/sysrq.txt>

Here is the list of possible values in /proc/sys/kernel/sysrq:
64 - enable signalling of processes (term, kill, oom-kill)
^^^^^^^^

but enable_mask is not set in sysrq_moom_op.

Signed-off-by: Naohiro Ooiwa <nooiwa@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Naohiro Ooiwa and committed by
Linus Torvalds
b4236f81 25ddbb18

+1
+1
drivers/char/sysrq.c
··· 326 326 .handler = sysrq_handle_moom, 327 327 .help_msg = "Full", 328 328 .action_msg = "Manual OOM execution", 329 + .enable_mask = SYSRQ_ENABLE_SIGNAL, 329 330 }; 330 331 331 332 static void sysrq_handle_kill(int key, struct tty_struct *tty)