ATH11K Archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: Johan Hovold <johan+linaro@kernel.org>,
	Kalle Valo <kvalo@kernel.org>,
	Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>,
	ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] wifi: ath11k: fix temperature event locking
Date: Thu, 19 Oct 2023 17:17:41 +0200	[thread overview]
Message-ID: <ZTFIlS79DclOOjrS@hovoldconsulting.com> (raw)
In-Reply-To: <4233c8af-5911-40bf-b5ba-dd0a63863a45@quicinc.com>

On Thu, Oct 19, 2023 at 08:04:55AM -0700, Jeff Johnson wrote:
> On 10/19/2023 3:42 AM, Johan Hovold wrote:
> > The ath11k active pdevs are protected by RCU but the temperature event
> > handling code calling ath11k_mac_get_ar_by_pdev_id() was not marked as a
> > read-side critical section as reported by RCU lockdep:
> 
> How do I enable this? Just enable CONFIG_PROVE_RCU?

Yeah, via CONFIG_PROVE_LOCKING.

> Of course I'd also need to exercise the code path...

Right, this one I hit when reading out the sensor temperature (e.g.
using lm_sensors).
 
> > +	rcu_read_lock();
> > +
> >   	ar = ath11k_mac_get_ar_by_pdev_id(ab, ev->pdev_id);
> >   	if (!ar) {
> >   		ath11k_warn(ab, "invalid pdev id in pdev temperature ev %d", ev->pdev_id);
> 
> aren't you missing an unlock() in this error path?
> 
> perhaps have a goto cleanup that does both the unlock() and the kfree()?

Bah, I am, thanks for catching that.

Spent too much time on scanning for further instances that I didn't
check the first one properly. Sorry about that. Will send a v2.

Johan

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  parent reply	other threads:[~2023-10-19 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 10:42 [PATCH 0/2] wifi: ath11k: fix event locking Johan Hovold
2023-10-19 10:42 ` [PATCH 1/2] wifi: ath11k: fix temperature " Johan Hovold
2023-10-19 15:04   ` Jeff Johnson
2023-10-19 15:07     ` Jeff Johnson
2023-10-19 15:17     ` Johan Hovold [this message]
2023-10-19 10:42 ` [PATCH 2/2] wifi: ath11k: fix dfs radar " Johan Hovold
2023-10-19 15:08   ` Jeff Johnson

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=ZTFIlS79DclOOjrS@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=johan+linaro@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=quic_pradeepc@quicinc.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).