mirror-linux/drivers/net/wireless
Jason A. Donenfeld 36cb649442 hwrng: core - let sleep be interrupted when unregistering hwrng
There are two deadlock scenarios that need addressing, which cause
problems when the computer goes to sleep, the interface is set down, and
hwrng_unregister() is called. When the deadlock is hit, sleep is delayed
for tens of seconds, causing it to fail. These scenarios are:

1) The hwrng kthread can't be stopped while it's sleeping, because it
   uses msleep_interruptible() which does not react to kthread_stop.

2) A normal user thread can't be interrupted by hwrng_unregister() while
   it's sleeping, because hwrng_unregister() is called from elsewhere.

We solve both issues by add a completion object called dying that
fulfils waiters once we have started the process in hwrng_unregister.

At the same time, we should cleanup a common and useless dmesg splat
in the same area.

Cc: <stable@vger.kernel.org>
Reported-by: Gregory Erwin <gregerwin256@gmail.com>
Fixes: fcd09c90c3 ("ath9k: use hw_random API instead of directly dumping into random.c")
Link: https://lore.kernel.org/all/CAO+Okf6ZJC5-nTE_EJUGQtd8JiCkiEHytGgDsFGTEjs0c00giw@mail.gmail.com/
Link: https://lore.kernel.org/lkml/CAO+Okf5k+C+SE6pMVfPf-d8MfVPVq4PO7EY8Hys_DVXtent3HA@mail.gmail.com/
Link: https://bugs.archlinux.org/task/75138
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Acked-by: Kalle Valo <kvalo@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-08-19 18:39:34 +08:00
..
admtek wifi: mac80211: split bss_info_changed method 2022-06-20 12:55:09 +02:00
ath hwrng: core - let sleep be interrupted when unregistering hwrng 2022-08-19 18:39:34 +08:00
atmel wifi: atmel: fix repeated words in comments 2022-07-18 15:06:59 +03:00
broadcom Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
cisco
intel Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
intersil wifi: p54: add missing parentheses in p54_flush() 2022-07-18 14:54:50 +03:00
marvell SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
mediatek wifi: mt7601u: fix clang -Wformat warning 2022-07-18 14:54:23 +03:00
microchip wifi: wilc1000: fix spurious inline in wilc_handle_disconnect() 2022-08-08 11:11:04 +03:00
purelifi wifi: plfxlc: Use eth_zero_addr() to assign zero address 2022-07-27 16:01:16 +03:00
quantenna wifi: qtnfmac: fix repeated words in comments 2022-07-18 15:09:03 +03:00
ralink wifi: rt2x00: fix repeated words in comments 2022-07-18 15:10:52 +03:00
realtek wifi: rtw88: check the return value of alloc_workqueue() 2022-07-29 16:35:53 +03:00
rsi wifi: rsi: fix repeated words in comments 2022-07-18 15:11:53 +03:00
silabs wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() 2022-07-15 11:43:20 +02:00
st wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
ti wifi: wl12xx: Drop if with an always false condition 2022-07-27 15:51:53 +03:00
zydas wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
Kconfig
Makefile wireless: Fix Makefile to be in alphabetical order 2022-05-17 18:29:49 +03:00
mac80211_hwsim.c wifi: mac80211_hwsim: handle links for wmediumd/virtio 2022-07-22 14:28:20 +02:00
mac80211_hwsim.h wifi: mac80211_hwsim: support creating MLO-capable radios 2022-06-20 12:57:09 +02:00
ray_cs.c wifi: ray_cs: Drop useless status variable in parse_addr() 2022-06-08 11:08:34 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c cfg80211: Indicate MLO connection info in connect and roam callbacks 2022-06-20 12:57:09 +02:00
virt_wifi.c wifi: virt_wifi: fix typo in comment 2022-06-10 15:35:49 +02:00
wl3501.h
wl3501_cs.c