All of lore.kernel.org
 help / color / mirror / Atom feed
* net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
@ 2021-01-22 10:11 Borislav Petkov
  2021-01-22 10:50 ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2021-01-22 10:11 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: Kalle Valo, linux-wireless, lkml

Hi,

this triggers is on 5.11-rc3 + tip/x86/urgent (shouldn't matter tho),
32-bit kernel:

[   10.019444] rtl8192ce: Chip Version ID: B_CHIP_88C
[   10.042810] rtl8192ce: Using firmware rtlwifi/rtl8192cfw.bin

[   10.044258] =============================
[   10.044337] WARNING: suspicious RCU usage
[   10.044417] 5.11.0-rc3+ #1 Not tainted
[   10.044494] -----------------------------
[   10.044572] net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
[   10.044696] 
               other info that might help us debug this:

[   10.044833] 
               rcu_scheduler_active = 2, debug_locks = 1
[   10.044950] 1 lock held by udevd/301:
[   10.045025]  #0: c2ef8944 (&dev->mutex){....}-{3:3}, at: device_driver_attach+0x37/0xc0
[   10.045230] 
               stack backtrace:
[   10.045316] CPU: 0 PID: 301 Comm: udevd Not tainted 5.11.0-rc3+ #1
[   10.045428] Hardware name: LENOVO 30515QG/30515QG, BIOS 8RET30WW (1.12 ) 09/15/2011
[   10.045561] Call Trace:
[   10.045619]  dump_stack+0x6d/0x8b
[   10.045694]  lockdep_rcu_suspicious+0xbb/0xc4
[   10.045787]  get_wiphy_regdom+0x55/0x60 [cfg80211]
[   10.045995]  wiphy_apply_custom_regulatory+0xa4/0xe0 [cfg80211]
[   10.046191]  ? rtl_regd_init+0x180/0x180 [rtlwifi]
[   10.046299]  rtl_regd_init+0xd6/0x180 [rtlwifi]
[   10.046399]  rtl_init_core+0x1d7/0x910 [rtlwifi]
[   10.046500]  ? __const_udelay+0x35/0x40
[   10.046583]  rtl_pci_probe+0x776/0x1080 [rtl_pci]
[   10.046675]  ? _raw_spin_unlock_irqrestore+0x55/0x70
[   10.046770]  ? _raw_spin_unlock_irqrestore+0x38/0x70
[   10.046863]  ? __pm_runtime_resume+0x5a/0x90
[   10.046950]  ? trace_preempt_on+0x29/0xc0
[   10.047033]  ? __pm_runtime_resume+0x5a/0x90
[   10.047118]  ? preempt_count_sub+0xb9/0x110
[   10.047204]  ? _raw_spin_unlock_irqrestore+0x7/0x70
[   10.047297]  ? __pm_runtime_resume+0x5a/0x90
[   10.047383]  pci_device_probe+0xa4/0x110
[   10.047465]  ? sysfs_create_link+0x22/0x40
[   10.047551]  really_probe+0xd3/0x450
[   10.047625]  ? _raw_spin_unlock_irq+0x2d/0x50
[   10.047711]  driver_probe_device+0x5a/0x1b0
[   10.047793]  ? pci_match_device+0xbe/0xf0
[   10.047873]  ? preempt_count_sub+0xb9/0x110
[   10.047960]  device_driver_attach+0xb1/0xc0
[   10.048044]  __driver_attach+0x99/0x150
[   10.048122]  ? klist_next+0x93/0x140
[   10.048199]  ? device_driver_attach+0xc0/0xc0
[   10.048283]  bus_for_each_dev+0x5d/0xa0
[   10.048364]  driver_attach+0x1e/0x20
[   10.048437]  ? device_driver_attach+0xc0/0xc0
[   10.048521]  bus_add_driver+0x11f/0x1f0
[   10.048602]  driver_register+0x7f/0xd0
[   10.048681]  ? 0xf7f04000
[   10.048741]  __pci_register_driver+0x5c/0x70
[   10.048826]  rtl92ce_driver_init+0x1c/0x1000 [rtl8192ce]
[   10.048933]  do_one_initcall+0x5c/0x2f0
[   10.049012]  ? rcu_read_lock_sched_held+0x41/0x80
[   10.049105]  ? trace_kmalloc+0x53/0xf0
[   10.049184]  ? kmem_cache_alloc_trace+0xdf/0x1b0
[   10.049273]  ? do_init_module+0x24/0x260
[   10.049354]  do_init_module+0x53/0x260
[   10.049433]  load_module+0x2525/0x2b10
[   10.049517]  ? kernel_read+0x3e/0x50
[   10.049600]  __ia32_sys_finit_module+0xbd/0x120
[   10.049698]  __do_fast_syscall_32+0x54/0x80
[   10.049781]  do_fast_syscall_32+0x30/0x70
[   10.049861]  do_SYSENTER_32+0x15/0x20
[   10.049936]  entry_SYSENTER_32+0x9f/0xf2
[   10.050016] EIP: 0xb7f46549
[   10.050079] Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76
[   10.050376] EAX: ffffffda EBX: 0000000f ECX: b7ce5e63 EDX: 00000000
[   10.050486] ESI: 00bf8ed0 EDI: 00beb080 EBP: 00bf7f50 ESP: bfef492c
[   10.050596] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000246
[   10.060833] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   10.066096] rtlwifi: rtlwifi: wireless switch is on

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
  2021-01-22 10:11 net/wireless/reg.c:144 suspicious rcu_dereference_check() usage! Borislav Petkov
@ 2021-01-22 10:50 ` Borislav Petkov
  2021-01-22 12:20   ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2021-01-22 10:50 UTC (permalink / raw)
  To: Jiri Slaby, Nick Kossifidis, Luis Chamberlain
  Cc: Ping-Ke Shih, Kalle Valo, linux-wireless, lkml

On Fri, Jan 22, 2021 at 11:11:24AM +0100, Borislav Petkov wrote:
> Hi,
> 
> this triggers is on 5.11-rc3 + tip/x86/urgent (shouldn't matter tho),
> 32-bit kernel:

This looks like a multiple wireless drivers issue, this is on another
32-bit machine with ath5k this time:

[   23.810222] ath5k 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[   23.847597] ath5k 0000:03:00.0: registered as 'phy0'
[   24.504999] ath: EEPROM regdomain: 0x65
[   24.516125] ath: EEPROM indicates we should expect a direct regpair map
[   24.527286] ath: Country alpha2 being used: 00
[   24.535435] ath: Regpair used: 0x65

[   24.551461] =============================
[   24.561941] WARNING: suspicious RCU usage
[   24.572030] 5.11.0-rc3+ #1 Not tainted
[   24.580276] -----------------------------
[   24.590764] net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
[   24.601730] 
               other info that might help us debug this:

[   24.625866] 
               rcu_scheduler_active = 2, debug_locks = 1
[   24.640870] 1 lock held by systemd-udevd/1134:
[   24.648773]  #0: c333e160 (&dev->mutex){....}-{3:3}, at: device_driver_attach+0x36/0xb0
[   24.656906] 
               stack backtrace:
[   24.671108] CPU: 0 PID: 1134 Comm: systemd-udevd Not tainted 5.11.0-rc3+ #1
[   24.671762] Hardware name: Acer AOA150/, BIOS v0.3309 10/06/2008
[   24.671762] Call Trace:
[   24.671762]  dump_stack+0x6d/0x8b
[   24.671762]  lockdep_rcu_suspicious+0xbb/0xc4
[   24.671762]  get_wiphy_regdom+0x5d/0x60 [cfg80211]
[   24.671762]  wiphy_apply_custom_regulatory+0xa0/0xe0 [cfg80211]
[   24.716225]  ath_regd_init.cold+0x7f/0xb0b [ath]
[   24.716225]  ? ath5k_ioread32+0x20/0x20 [ath5k]
[   24.716225]  ath5k_init_ah+0x953/0xbb0 [ath5k]
[   24.716225]  ath5k_pci_probe.cold+0x8f/0x10a [ath5k]
[   24.716225]  pci_device_probe+0x9c/0x110
[   24.716225]  really_probe+0xc6/0x300
[   24.716225]  driver_probe_device+0x49/0xa0
[   24.716225]  device_driver_attach+0xa9/0xb0
[   24.716225]  __driver_attach+0x46/0xb0
[   24.728122]  ? device_driver_attach+0xb0/0xb0
[   24.728122]  bus_for_each_dev+0x51/0x90
[   24.728122]  driver_attach+0x19/0x20
[   24.728122]  ? device_driver_attach+0xb0/0xb0
[   24.728122]  bus_add_driver+0xf0/0x1b0
[   24.728122]  driver_register+0x7c/0xd0
[   24.728122]  ? 0xf80af000
[   24.728122]  __pci_register_driver+0x52/0x60
[   24.728122]  ath5k_pci_driver_init+0x1c/0x1000 [ath5k]
[   24.728122]  do_one_initcall+0x5c/0x2e0
[   24.728122]  ? rcu_read_lock_sched_held+0x41/0x80
[   24.728122]  ? trace_kmalloc+0x53/0xe0
[   24.728122]  ? kmem_cache_alloc_trace+0xc8/0x170
[   24.728122]  ? do_init_module+0x21/0x250
[   24.774047]  do_init_module+0x50/0x250
[   24.774047]  load_module+0x2509/0x27b0
[   24.774047]  __ia32_sys_finit_module+0x85/0xb0
[   24.774047]  __do_fast_syscall_32+0x54/0x90
[   24.774047]  do_fast_syscall_32+0x29/0x60
[   24.774047]  do_SYSENTER_32+0x15/0x20
[   24.774047]  entry_SYSENTER_32+0x9f/0xf2
[   24.774047] EIP: 0xb7fc1549
[   24.774047] Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76
[   24.774047] EAX: ffffffda EBX: 00000010 ECX: b7da3bdd EDX: 00000000
[   24.774047] ESI: 01e757b0 EDI: 01e66420 EBP: 01e69590 ESP: bfc16fec
[   24.774047] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000296
[   24.891505] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   24.913211] ath5k: phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY: 0x70)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
  2021-01-22 10:50 ` Borislav Petkov
@ 2021-01-22 12:20   ` Kalle Valo
  2021-01-22 12:57     ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2021-01-22 12:20 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Jiri Slaby, Nick Kossifidis, Luis Chamberlain, Ping-Ke Shih,
	linux-wireless, lkml

Borislav Petkov <bp@alien8.de> writes:

> On Fri, Jan 22, 2021 at 11:11:24AM +0100, Borislav Petkov wrote:
>> Hi,
>> 
>> this triggers is on 5.11-rc3 + tip/x86/urgent (shouldn't matter tho),
>> 32-bit kernel:
>
> This looks like a multiple wireless drivers issue, this is on another
> 32-bit machine with ath5k this time:
>
> [   23.810222] ath5k 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
> [   23.847597] ath5k 0000:03:00.0: registered as 'phy0'
> [   24.504999] ath: EEPROM regdomain: 0x65
> [   24.516125] ath: EEPROM indicates we should expect a direct regpair map
> [   24.527286] ath: Country alpha2 being used: 00
> [   24.535435] ath: Regpair used: 0x65
>
> [   24.551461] =============================
> [   24.561941] WARNING: suspicious RCU usage
> [   24.572030] 5.11.0-rc3+ #1 Not tainted
> [   24.580276] -----------------------------
> [   24.590764] net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
> [   24.601730] 

Can you try this commit:

51d62f2f2c50 cfg80211: Save the regulatory domain with a lock

https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git/commit/?id=51d62f2f2c50

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: net/wireless/reg.c:144 suspicious rcu_dereference_check() usage!
  2021-01-22 12:20   ` Kalle Valo
@ 2021-01-22 12:57     ` Borislav Petkov
  0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2021-01-22 12:57 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Jiri Slaby, Nick Kossifidis, Luis Chamberlain, Ping-Ke Shih,
	linux-wireless, lkml

On Fri, Jan 22, 2021 at 02:20:43PM +0200, Kalle Valo wrote:
> Can you try this commit:
> 
> 51d62f2f2c50 cfg80211: Save the regulatory domain with a lock
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git/commit/?id=51d62f2f2c50

Yap, that fixes both machines, thx!

Reported-by: Borislav Petkov <bp@suse.de>
Tested-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-22 12:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 10:11 net/wireless/reg.c:144 suspicious rcu_dereference_check() usage! Borislav Petkov
2021-01-22 10:50 ` Borislav Petkov
2021-01-22 12:20   ` Kalle Valo
2021-01-22 12:57     ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.