OpenCloudOS-Kernel/drivers/net
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
..
appletalk
arcnet
bonding bonding: fix reference count leak in balance-alb mode 2022-08-11 08:51:05 -07:00
caif caif_virtio: fix race between virtio_device_ready() and ndo_open() 2022-06-27 08:04:30 -04:00
can Including fixes from bluetooth, bpf, can and netfilter. 2022-08-11 13:45:37 -07:00
dsa net: dsa: felix: suppress non-changes to the tagging protocol 2022-08-09 12:13:03 -07:00
ethernet Including fixes from bluetooth, bpf, can and netfilter. 2022-08-11 13:45:37 -07:00
fddi fddi/skfp: fix repeated words in comments 2022-07-11 14:12:54 +01:00
fjes
hamradio hamradio: 6pack: fix array-index-out-of-bounds in decode_std_command() 2022-06-17 11:39:46 +01:00
hippi
hyperv
ieee802154
ipa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-28 18:21:16 -07:00
ipvlan
mctp
mdio net: mdio: Delete usage of driver_deferred_probe_check_state() 2022-06-10 15:57:54 +02:00
netdevsim Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-08-03 09:04:55 +02:00
pcs Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-28 18:21:16 -07:00
phy net: phy: dp83867: fix get nvmem cell fail 2022-08-08 20:57:03 -07:00
plip plip: avoid rcu debug splat 2022-08-09 12:16:02 -07:00
ppp ppp: Fix typo in comment 2022-06-17 20:17:04 -07:00
slip
team team: adopt u64_stats_t 2022-06-09 21:53:12 -07:00
usb net: usb: qmi_wwan: Add support for Cinterion MV32 2022-08-11 07:58:42 -07:00
vmxnet3 vmxnet3: do not reschedule napi for rx processing 2022-07-29 12:11:23 +01:00
vxlan vxlan: do not use RT_TOS for IPv6 flowlabel 2022-08-09 22:19:20 -07:00
wan
wireguard Char / Misc driver changes for 6.0-rc1 2022-08-04 11:05:48 -07:00
wireless hwrng: core - let sleep be interrupted when unregistering hwrng 2022-08-19 18:39:34 +08:00
wwan
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-14 15:27:35 -07:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-07 12:07:37 -07:00
LICENSE.SRC
Makefile
Space.c
amt.c amt: fix typo in comment 2022-07-28 22:21:51 -07:00
bareudp.c
dummy.c
eql.c
geneve.c geneve: do not use RT_TOS for IPv6 flowlabel 2022-08-09 22:19:20 -07:00
gtp.c
ifb.c
loopback.c
macsec.c macsec: Fix traffic counters/statistics 2022-08-10 13:45:06 +01:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() 2022-07-21 19:04:19 -07:00
tap.c net: tap: NULL pointer derefence in dev_parse_header_protocol when skb->dev is null 2022-08-05 08:56:35 +01:00
thunderbolt.c
tun.c net: tun: avoid disabling NAPI twice 2022-06-30 11:34:10 -07:00
veth.c Revert "veth: Add updating of trans_start" 2022-08-03 19:20:13 -07:00
virtio_net.c virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
vrf.c xfrm: no need to set DST_NOPOLICY in IPv4 2022-06-10 11:01:36 +02:00
vsockmon.c
xen-netfront.c xen-netfront: re-order error checks in xennet_get_responses() 2022-07-14 12:20:18 +02:00