]> git.baikalelectronics.ru Git - kernel.git/commit
printk: track/limit recursion
authorJohn Ogness <john.ogness@linutronix.de>
Thu, 15 Jul 2021 19:33:55 +0000 (21:39 +0206)
committerPetr Mladek <pmladek@suse.com>
Mon, 26 Jul 2021 13:07:15 +0000 (15:07 +0200)
commit70358d6b1d16d88ea3936d7b4586070d8d4e2741
treed1cc9a2e98d07e23d26ad165841d3881556f8d25
parenta4ec2f17f0522a6e8089af616e2719159bab4e4a
printk: track/limit recursion

Currently the printk safe buffers provide a form of recursion
protection by redirecting to the safe buffers whenever printk() is
recursively called.

In preparation for removal of the safe buffers, provide an alternate
explicit recursion protection. Recursion is limited to 3 levels
per-CPU and per-context.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210715193359.25946-3-john.ogness@linutronix.de
kernel/printk/printk.c