]> git.baikalelectronics.ru Git - kernel.git/commit
serial: core: Remove BUG_ON(in_interrupt()) check
authorAhmed S. Darwish <a.darwish@linutronix.de>
Mon, 8 Feb 2021 18:16:15 +0000 (19:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Feb 2021 10:45:04 +0000 (11:45 +0100)
commitbad9b4e472465ce2e60615ef988f3b1b26e5d6db
tree62730ddebfe1dad9bc08c085d0bbd2ddaaa491fb
parent54b4a2afad22c0dfe05a68f849dd36b7d0a968a0
serial: core: Remove BUG_ON(in_interrupt()) check

The usage of in_interrupt() in drivers is phased out for various
reasons.

In both exported functions where BUG_ON(in_interrupt()) is invoked,
there is a mutex_lock() afterwards. mutex_lock() contains a
might_sleep() which will already trigger a stack trace if the target
functions is called from atomic context.

Remove the BUG_ON() and add a "Context: " in the kernel-doc instead.

Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210208181615.381861-3-bigeasy@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c