]> git.baikalelectronics.ru Git - kernel.git/commit
staging: wfx: fix race between configure_filter and remove_interface
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Fri, 10 Apr 2020 13:32:21 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 12:42:35 +0000 (14:42 +0200)
commit0f4cef26a283bc59cd003f52c6bd6d638a4aad6d
tree3da78a6b8f0a8b09200a8b1479eedaec10888e15
parent0c87c80c9799facb04921e1298e08d201ec1a4c5
staging: wfx: fix race between configure_filter and remove_interface

wfx_remove_interface() and wfx_configure_filter() can be run
concurrently. Therefore, this patch protect access to the list of
interfaces from wfx_configure_filter().

Notice that wfx_configure_filter() now lock "conf_lock" and "scan_lock".
Beside that, wfx_hw_scan_work() also access to the same locks. So we
have to lock them in same order to avoid any deadlock.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200410133239.438347-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/scan.c
drivers/staging/wfx/sta.c