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

sysrq: add commentary on why we use the console loglevel over using KERN_EMERG

Add an explanitory comment as to why we modify the kernel console loglevel
rather than simply moving sysrq messages to KERN_EMERG level.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andy Whitcroft and committed by
Linus Torvalds
fb144adc 47c33d9c

+6
+6
drivers/char/sysrq.c
··· 473 473 unsigned long flags; 474 474 475 475 spin_lock_irqsave(&sysrq_key_table_lock, flags); 476 + /* 477 + * Raise the apparent loglevel to maximum so that the sysrq header 478 + * is shown to provide the user with positive feedback. We do not 479 + * simply emit this at KERN_EMERG as that would change message 480 + * routing in the consumers of /proc/kmsg. 481 + */ 476 482 orig_log_level = console_loglevel; 477 483 console_loglevel = 7; 478 484 printk(KERN_INFO "SysRq : ");