All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Rajat Asthana <rajatasthana4@gmail.com>
Cc: ath9k-devel@qca.qualcomm.com, davem@davemloft.net,
	kuba@kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ath9k_htc: Add a missing spin_lock_init()
Date: Thu, 29 Jul 2021 10:41:49 +0300	[thread overview]
Message-ID: <87h7gdftxe.fsf@codeaurora.org> (raw)
In-Reply-To: <20210728192533.18727-1-rajatasthana4@gmail.com> (Rajat Asthana's message of "Thu, 29 Jul 2021 00:55:33 +0530")

Rajat Asthana <rajatasthana4@gmail.com> writes:

> Syzkaller reported a lockdep warning on non-initialized spinlock:
>
> INFO: trying to register non-static key.
> The code is fine but needs lockdep annotation, or maybe
> you didn't initialize this object before use?
> turning off the locking correctness validator.
> CPU: 0 PID: 10 Comm: ksoftirqd/0 Not tainted 5.13.0-rc4-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
>  __dump_stack lib/dump_stack.c:79 [inline]
>  dump_stack+0x143/0x1db lib/dump_stack.c:120
>  assign_lock_key kernel/locking/lockdep.c:937 [inline]
>  register_lock_class+0x1077/0x1180 kernel/locking/lockdep.c:1249
>  __lock_acquire+0x102/0x5230 kernel/locking/lockdep.c:4781
>  lock_acquire kernel/locking/lockdep.c:5512 [inline]
>  lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5477
>  __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
>  _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:175
>  spin_lock_bh include/linux/spinlock.h:359 [inline]
>  ath9k_wmi_event_tasklet+0x231/0x3f0 drivers/net/wireless/ath/ath9k/wmi.c:172
>  tasklet_action_common.constprop.0+0x201/0x2e0 kernel/softirq.c:784
>  __do_softirq+0x1b0/0x944 kernel/softirq.c:559
>  run_ksoftirqd kernel/softirq.c:921 [inline]
>  run_ksoftirqd+0x21/0x50 kernel/softirq.c:913
>  smpboot_thread_fn+0x3ec/0x870 kernel/smpboot.c:165
>  kthread+0x38c/0x460 kernel/kthread.c:313
>  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
>
> We missed a spin_lock_init() in ath9k_wmi_event_tasklet() when the wmi
> event is WMI_TXSTATUS_EVENTID. So, add a spin_lock_init() in
> ath9k_init_wmi().
>
> Signed-off-by: Rajat Asthana <rajatasthana4@gmail.com>

I assume this version is also not tested on a real device. Can someone
review and/or test this, please?

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

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

  reply	other threads:[~2021-07-29  7:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 21:43 [PATCH] ath9k_htc: Add a missing spin_lock_init() Rajat Asthana
2021-07-28  7:11 ` Kalle Valo
2021-07-28 19:02   ` Rajat Asthana
2021-07-28 19:25     ` [PATCH v2] " Rajat Asthana
2021-07-29  7:41       ` Kalle Valo [this message]
2021-12-20 15:50       ` Kalle Valo
2021-07-29  7:40     ` [PATCH] " Kalle Valo
     [not found] <38fa8cc-c9c4-66c1-e2ee-fe02caa7ef63@gmail.com>
2021-07-28 19:17 ` [PATCH v2] " Rajat Asthana
2021-07-28 19:37   ` Rajat Asthana

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=87h7gdftxe.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rajatasthana4@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 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.