linux/drivers/staging/rtlwifi
Jia-Ju Bai ac5e4875e6 staging: rtlwifi: Fix a possible sleep-in-atomic-context bug in _is_fw_read_cmd_down()
The driver may sleep with holding a spinlock.
The function call path (from bottom to top) in Linux-4.16.7 is:

[FUNC] schedule
drivers/staging/rtlwifi/halmac/rtl_halmac.c, 884:
		schedule in _is_fw_read_cmd_down
drivers/staging/rtlwifi/halmac/rtl_halmac.c, 912:
		_is_fw_read_cmd_down in rtl_halmac_send_h2c
drivers/staging/rtlwifi/halmac/rtl_halmac.c, 907:
		_raw_spin_lock_irqsave in rtl_halmac_send_h2c

To fix this bug, schedule() is replaced with mdelay(1).

This bug is found by my static analysis tool (DSAC-2) and checked by
my code review.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 22:10:51 +09:00
..
btcoexist staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
halmac staging: rtlwifi: Fix a possible sleep-in-atomic-context bug in _is_fw_read_cmd_down() 2018-06-28 22:10:51 +09:00
phydm staging: rtlwifi: Fix "Trafic"->"Traffic" 2018-06-17 09:05:14 +02:00
rtl8822be staging: rtlwifi: Fix "Alwyas"->"Always" 2018-06-17 09:05:14 +02:00
base.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
base.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
cam.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
cam.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
core.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
core.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
debug.c staging: rtlwifi: don't check the return value of debugfs_create_file 2018-06-01 10:47:43 +02:00
debug.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
efuse.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
efuse.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
Kconfig Kconfig updates for v4.16 2018-02-01 11:45:49 -08:00
Makefile staging: r8822be: Add Makefiles and Kconfig for new driver 2017-08-20 11:13:12 -07:00
pci.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
pci.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
ps.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
ps.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
pwrseqcmd.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
rc.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
rc.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
regd.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
regd.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
stats.c staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
stats.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00
TODO staging: rtlwifi: Reviewers fixes 2017-08-20 11:13:12 -07:00
wifi.h staging: rtlwifi: Replace license boilerplate with SPDX identifiers 2018-05-06 19:01:29 -07:00