All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
To: sashiko-reviews@lists.linux.dev
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH wireless-next v2 1/2] wifi: wfx: fix possible device hang during init
Date: Tue, 01 Sep 2026 12:02:31 +0200	[thread overview]
Message-ID: <3436936.44csPzL39Z@nb0018864> (raw)
In-Reply-To: <20260901085012.21B011F000E9@smtp.kernel.org>

On Tuesday 1 September 2026 10:50:11 Central European Summer Time sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> 
> Pre-existing issues:
> - [High] Uncanceled delayed work triggers Use-After-Free.
> --
> 
> commit 0e92ce2797177a88d76cee72478042230234d0a4
> Author: Jérôme Pouiller <jerome.pouiller@silabs.com>
> 
> wifi: wfx: fix possible device hang during init
> 
> This commit fixes a device hang by limiting the use of the data polling
> mechanism to out-of-band SDIO IRQs. For in-band IRQs and SPI, the IRQ is
> now subscribed before the first hardware exchange, avoiding the polling
> workaround entirely.
> 
> > diff --git a/drivers/net/wireless/silabs/wfx/main.c b/drivers/net/wireless/silabs/wfx/main.c
> > index dda36e41eed13..4e99fe7e5bb78 100644
> > --- a/drivers/net/wireless/silabs/wfx/main.c
> > +++ b/drivers/net/wireless/silabs/wfx/main.c
> 
> [ ... ]
> 
> [Severity: High]
> This is a pre-existing issue, but I noticed a potential use-after-free in the
> driver cleanup path. When the device enters a high temperature state,
> wfx_suspend_hot_dev() schedules cooling_timeout_work on the system workqueue
> with a 10-second delay.
> 
> If the driver is unloaded or the device is removed before this timer expires,
> the devres callback wfx_free_common() frees the wdev structure without
> canceling the pending work:
> 
> drivers/net/wireless/silabs/wfx/main.c:wfx_free_common() {
>     ...
>     ieee80211_free_hw(wdev->hw);
>     ...
> }
> 
> Does the cleanup path need a call to cancel_delayed_work_sync() for
> wdev->cooling_timeout_work to prevent the delayed work from dereferencing
> the freed wdev pointer when it eventually executes?

To avoid confusion in reviews, I will fix that issue in another PR.


-- 
Jérôme Pouiller



  reply	other threads:[~2026-09-01 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  8:33 [PATCH wireless-next v2 0/2] wifi: wfx: fix possible device hang during init Jérôme Pouiller
2026-09-01  8:33 ` [PATCH wireless-next v2 1/2] " Jérôme Pouiller
2026-09-01  8:50   ` sashiko-bot
2026-09-01 10:02     ` Jérôme Pouiller [this message]
2026-09-01 10:43   ` Sverdlin, Alexander
2026-09-01 12:40     ` Sverdlin, Alexander
2026-09-01 14:15     ` Jérôme Pouiller
2026-09-01  8:33 ` [PATCH wireless-next v2 2/2] dt-bindings: net: wireless: wfx: discourage OOB IRQ with SDIO Jérôme Pouiller
2026-09-03 10:29   ` Krzysztof Kozlowski

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=3436936.44csPzL39Z@nb0018864 \
    --to=jerome.pouiller@silabs.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.