mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "S, Sanath" <Sanath.S@amd.com>
Cc: Mario Limonciello <superm1@kernel.org>,
	"Natikar, Basavaraj" <Basavaraj.Natikar@amd.com>,
	"Martinez, Juan" <Juan.Martinez@amd.com>,
	"westeri@kernel.org" <westeri@kernel.org>,
	"andreas.noever@gmail.com" <andreas.noever@gmail.com>,
	"YehezkelShB@gmail.com" <YehezkelShB@gmail.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] thunderbolt: Fix tb->lock deadlock during hot-unplug on AMD USB4 routers
Date: Tue, 15 Sep 2026 08:04:59 +0200	[thread overview]
Message-ID: <20260915060459.GJ106095@black.igk.intel.com> (raw)
In-Reply-To: <MW4PR12MB7016137EFD6AEB235F3D50E481BA2@MW4PR12MB7016.namprd12.prod.outlook.com>

Hi,

On Tue, Sep 15, 2026 at 04:51:00AM +0000, S, Sanath wrote:
> Ported it and stressed it on two Strix Halo hosts connected back to back.
> REG_CAPS reports hop_count = 3 here, so two usable DMA HopIDs. Observations:
> 
>  - Single tunnel it works: 50 x traffic then link down/up, plus 42 x
>    dma_test create / transfer / teardown. One reset per cycle, no ping loss,
>    no errors, and every ring restart had a reset before it.
> 
>  - Every reset is preceded by "dangling request in request_queue" and a
>    WARNING from tb_ctl_stop(), 8 of 8 cycles, via tb_domain_pause() <-
>    tb_ring_start() <- tbnet_connected_work().
> 
>  - Two tunnels: the networking ring is stopped and restarted with no reset
>    in between, because the check only runs in nhi_alloc_hop() and tbnet
>    reuses its rings across a reconnect. 18 such cycles did not hang, so the
>    unsafe reuse is reachable but I cannot say it hangs.
> 
>  - When the check does fire it takes networking down, reproduced twice:
>    "RTNETLINK answers: Cannot allocate memory" plus "out of HopIDs that do
>    not need a host interface reset", until the second tunnel stops.
> 
>  - tb_domain_pause() takes tb->lock from tb_ring_start(), while unplug holds
>    tb->lock across tbnet_remove() -> stop_login() ->
>    cancel_work_sync(&net->connected_work).
> 
> Moving the reset into a per-NHI work item scheduled from tb_ring_stop() when
> the last DMA ring stops removes the warning and the tb->lock inversion, and
> passes the same tests cleanly. The reuse hole and the lockout still need the
> reset to key off ring reuse rather than ring allocation.
> 
> Mika, Can I respin your patch along those lines and post it as a new version?

Of course. I'm thinking though that should we do the revert for v7.3-rcX
now and then do the proper fix for v7.4 with your updated patch?

  reply	other threads:[~2026-09-15  6:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 21:42 [PATCH v2] " juan.martinez
2026-08-26  3:02 ` Mario Limonciello
2026-08-27 21:57 ` [PATCH v3] " Juan Martinez
2026-08-28  4:43   ` Mario Limonciello
2026-08-28  5:19   ` [PATCH v4] " Juan Martinez
2026-08-28 14:58     ` Mario Limonciello
2026-08-31 11:11     ` Mika Westerberg
2026-08-31 12:55       ` Mario Limonciello
2026-08-31 13:06         ` Mika Westerberg
2026-08-31 13:07           ` Mario Limonciello
2026-08-31 16:16           ` [PATCH v5] " juan.martinez
2026-09-01 22:16             ` Mario Limonciello
2026-09-02  5:48               ` Mika Westerberg
2026-09-09 19:06                 ` Mario Limonciello
2026-09-10 14:19                   ` S, Sanath
2026-09-10 17:24                     ` Mario Limonciello
2026-09-15  4:51                       ` S, Sanath
2026-09-15  6:04                         ` Mika Westerberg [this message]
2026-09-15 20:39                           ` Mario Limonciello

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=20260915060459.GJ106095@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=Juan.Martinez@amd.com \
    --cc=Sanath.S@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=superm1@kernel.org \
    --cc=westeri@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

all inboxes | Powered by JetHome®