]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: rtl8192cu: Fix WARNING when calling local_irq_restore() with interrupts...
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 15 Dec 2021 17:11:05 +0000 (11:11 -0600)
committerKalle Valo <kvalo@kernel.org>
Mon, 20 Dec 2021 19:04:49 +0000 (21:04 +0200)
commit49ab303be6f6ee684d149389dd843eeb7c6793a0
treee39cf37b69d3a9fa1b202a798ad26c3f77e1828f
parent5529a63d338930c056439598c6c4647bb59b2b3b
rtlwifi: rtl8192cu: Fix WARNING when calling local_irq_restore() with interrupts enabled

Syzbot reports the following WARNING:

[200~raw_local_irq_restore() called with IRQs enabled
WARNING: CPU: 1 PID: 1206 at kernel/locking/irqflag-debug.c:10
   warn_bogus_irq_restore+0x1d/0x20 kernel/locking/irqflag-debug.c:10

Hardware initialization for the rtl8188cu can run for as long as 350 ms,
and the routine may be called with interrupts disabled. To avoid locking
the machine for this long, the current routine saves the interrupt flags
and enables local interrupts. The problem is that it restores the flags
at the end without disabling local interrupts first.

This patch fixes commit 57af2d06b894 ("rtlwifi: rtl8192cu: Fix too long
disable of IRQs").

Reported-by: syzbot+cce1ee31614c171f5595@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Fixes: 57af2d06b894 ("rtlwifi: rtl8192cu: Fix too long disable of IRQs")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211215171105.20623-1-Larry.Finger@lwfinger.net
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c