All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Loic Poulain <loic.poulain@oss.qualcomm.com>,
	Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH net] net: wwan: mhi_wwan_mbim: disable rx_refill work on removal
Date: Wed, 11 Nov 2026 17:41:06 -0800	[thread overview]
Message-ID: <20261111174106.09f639ca@kernel.org> (raw)
In-Reply-To: <20261110043006.56681-1-mhun512@gmail.com>

On Mon,  9 Nov 2026 23:30:06 -0500 Myeonghun Pak wrote:
> mhi_mbim_remove() cancels rx_refill before wwan_unregister_ops()
> removes the links. Bringing a link up in between calls mhi_mbim_ndo_open()
> and queues the work again. With the MHI channels already reset, the
> work cannot refill RX buffers and keeps re-arming itself, eventually
> running after devres frees the context.
> 
> Use disable_delayed_work_sync() to drain the work and reject later
> queueing. Probe initializes fresh work on rebind.
> 
> Found by a static analysis tool under development.
> 
> Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver")
> Cc: stable@vger.kernel.org # v6.10+
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> 
> ---
> 
> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
> index 336f89756f10..3b6b0066f673 100644
> --- a/drivers/net/wwan/mhi_wwan_mbim.c
> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
> @@ -650,7 +650,7 @@ static void mhi_mbim_remove(struct mhi_device *mhi_dev)
>  	struct mhi_controller *cntrl = mhi_dev->mhi_cntrl;
>  
>  	mhi_unprepare_from_transfer(mhi_dev);
> -	cancel_delayed_work_sync(&mbim->rx_refill);
> +	disable_delayed_work_sync(&mbim->rx_refill);
>  	wwan_unregister_ops(&cntrl->mhi_dev->dev);
>  	kfree_skb(mbim->skbagg_head);
>  	dev_set_drvdata(&mhi_dev->dev, NULL);

AI says this is not enough for make the teardown correct:

https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110043006.56681-1-mhun512@gmail.com
-- 
pw-bot: cr

  parent reply	other threads:[~2026-11-12  1:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  4:30 [PATCH net] net: wwan: mhi_wwan_mbim: disable rx_refill work on removal Myeonghun Pak
2026-11-10  5:05 ` netdev-bot+sinfo
2026-11-10  8:56 ` Loic Poulain
2026-11-12  1:41 ` Jakub Kicinski [this message]
2026-11-12  8:04   ` Loic Poulain

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=20261111174106.09f639ca@kernel.org \
    --to=kuba@kernel.org \
    --cc=ae878000@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=mhun512@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ryazanov.s.a@gmail.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 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.