linux/drivers/staging/dgnc
Jia-Ju Bai bffa9b1cc6 staging: dgnc: Fix a sleep-in-atomic-context bug in cls_assert_modem_signals()
The driver may sleep with holding a spinlock.
The function call path (from bottom to top) in Linux-4.17 is:

[FUNC] usleep_range
drivers/staging/dgnc/dgnc_cls.c, 391:
	usleep_range in cls_assert_modem_signals
drivers/staging/dgnc/dgnc_cls.c, 449:
	cls_assert_modem_signals in cls_copy_data_from_queue_to_uart
drivers/staging/dgnc/dgnc_cls.c, 406:
	_raw_spin_lock_irqsave in cls_copy_data_from_queue_to_uart

To fix this bug, usleep_range() is replaced with udelay().

This bug is found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:29:10 +02:00
..
dgnc_cls.c staging: dgnc: Fix a sleep-in-atomic-context bug in cls_assert_modem_signals() 2018-09-18 13:29:10 +02:00
dgnc_cls.h staging: dgnc: remove redundant license text 2018-01-15 16:03:45 +01:00
dgnc_driver.c staging: dgnc: remove "vpd" board variable 2018-01-17 15:02:56 +01:00
dgnc_driver.h staging: dgnc: drop unused neo_uart_struct 2018-01-17 15:02:56 +01:00
dgnc_tty.c staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line 2018-07-24 14:00:54 +02:00
dgnc_tty.h staging: dgnc: remove redundant license text 2018-01-15 16:03:45 +01:00
digi.h staging: dgnc: delete dpastatus board type variable. 2018-01-17 15:02:56 +01:00
Kconfig
Makefile staging: dgnc: delete dgnc_neo.* files 2018-01-17 15:02:55 +01:00
TODO staging: dgnc: remove error message task 2017-03-29 09:37:10 +02:00