public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH rtw-next] wifi: rtw88: Use led->brightness_set_blocking for PCI too
Date: Wed, 20 Aug 2025 00:26:45 +0000	[thread overview]
Message-ID: <aba7583da5fc48bca933d4b5d2fae6aa@realtek.com> (raw)
In-Reply-To: <ad8a49ef-4f2d-4a61-8292-952db9c4eb65@gmail.com>

Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> Commit 26a8bf978ae9 ("wifi: rtw88: Lock rtwdev->mutex before setting
> the LED") made rtw_led_set() sleep, but that's not allowed. Fix it by
> using the brightness_set_blocking member of struct led_classdev for
> PCI devices too. This one is allowed to sleep.
> 
> bad: scheduling from the idle thread!
> nix kernel: CPU: 7 UID: 0 PID: 0 Comm: swapper/7 Tainted: G        W  O        6.16.0 #1-NixOS
> PREEMPT(voluntary)
> nix kernel: Tainted: [W]=WARN, [O]=OOT_MODULE
> nix kernel: Hardware name: [REDACTED]
> nix kernel: Call Trace:
> nix kernel:  <IRQ>
> nix kernel:  dump_stack_lvl+0x63/0x90
> nix kernel:  dequeue_task_idle+0x2d/0x50
> nix kernel:  __schedule+0x191/0x1310
> nix kernel:  ? xas_load+0x11/0xd0
> nix kernel:  schedule+0x2b/0xe0
> nix kernel:  schedule_preempt_disabled+0x19/0x30
> nix kernel:  __mutex_lock.constprop.0+0x3fd/0x7d0
> nix kernel:  rtw_led_set+0x27/0x60 [rtw_core]
> nix kernel:  led_blink_set_nosleep+0x56/0xb0
> nix kernel:  led_trigger_blink+0x49/0x80
> nix kernel:  ? __pfx_tpt_trig_timer+0x10/0x10 [mac80211]
> nix kernel:  call_timer_fn+0x2f/0x140
> nix kernel:  ? __pfx_tpt_trig_timer+0x10/0x10 [mac80211]
> nix kernel:  __run_timers+0x21a/0x2b0
> nix kernel:  run_timer_softirq+0x8e/0x100
> nix kernel:  handle_softirqs+0xea/0x2c0
> nix kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
> nix kernel:  __irq_exit_rcu+0xdc/0x100
> nix kernel:  sysvec_apic_timer_interrupt+0x7c/0x90
> nix kernel:  </IRQ>
> nix kernel:  <TASK>
> nix kernel:  asm_sysvec_apic_timer_interrupt+0x1a/0x20
> nix kernel: RIP: 0010:cpuidle_enter_state+0xcc/0x450
> nix kernel: Code: 00 e8 08 7c 2e ff e8 d3 ee ff ff 49 89 c6 0f 1f 44 00 00 31 ff e8 c4 d1 2c ff 80 7d d7
> 00 0f 85 5d 02 00 00 fb 0f 1f 44 00 00 <45> 85 ff 0f 88 a0 01 00 00 49 63 f7 4c 89 f2 48 8d 0>
> nix kernel: RSP: 0018:ffffd579801c7e68 EFLAGS: 00000246
> nix kernel: RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
> nix kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
> nix kernel: RBP: ffffd579801c7ea0 R08: 0000000000000000 R09: 0000000000000000
> nix kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff8eab0462a400
> nix kernel: R13: ffffffff9a7d7a20 R14: 00000003aebe751d R15: 0000000000000003
> nix kernel:  ? cpuidle_enter_state+0xbc/0x450
> nix kernel:  cpuidle_enter+0x32/0x50
> nix kernel:  do_idle+0x1b1/0x210
> nix kernel:  cpu_startup_entry+0x2d/0x30
> nix kernel:  start_secondary+0x118/0x140
> nix kernel:  common_startup_64+0x13e/0x141
> nix kernel:  </TASK>
> 
> Fixes: 26a8bf978ae9 ("wifi: rtw88: Lock rtwdev->mutex before setting the LED")

Cc: stable@vger.kernel.org

> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
> I'm not sure if the commit hash will be correct by the time that
> commit makes it into mainline?

We always go via wireless / wireless-next tree, so the commit must be there
already. Only question is that you want 6.17 (currently -rc2) or 6.18 (next)?
I think this should be 6.17, so tree selection of subject tag should be
"rtw" instead of "rtw-next". 



  reply	other threads:[~2025-08-20  0:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 18:46 [PATCH rtw-next] wifi: rtw88: Use led->brightness_set_blocking for PCI too Bitterblue Smith
2025-08-20  0:26 ` Ping-Ke Shih [this message]
2025-08-21 14:08   ` Bitterblue Smith
2025-08-22  0:25     ` Ping-Ke Shih
2025-08-26  1:26 ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aba7583da5fc48bca933d4b5d2fae6aa@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox