From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: b2amedina@gmail.com
Cc: Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] thunderbolt: Fix domain reference leak on DPRX work cancel
Date: Thu, 1 Oct 2026 05:48:39 +0200 [thread overview]
Message-ID: <20261001034839.GA176164@black.igk.intel.com> (raw)
In-Reply-To: <20260930-tb-dprx-fix-v1-1-da92659e491a@gmail.com>
Hi,
On Wed, Sep 30, 2026 at 10:16:35PM -0400, David Medina via B4 Relay wrote:
> From: David Medina <b2amedina@gmail.com>
>
> tb_dp_dprx_start() takes an additional reference to the domain with
> tb_domain_get() and passes it as callback_data to tb_tunnel_alloc_dp().
> That reference is only released by the callback, tb_dp_tunnel_active(),
> which tb_dp_dprx_work() invokes once the DPRX capabilities read completes
> or times out.
>
> If the tunnel is deactivated before the DPRX work runs to completion,
> tb_dp_dprx_stop() cancels the still pending work. The callback is then
> never called and the domain reference held in callback_data leaks. The
> domain's reference count never reaches zero, so tb_domain_release() never
> runs and a subsequent shutdown/reboot hangs waiting for the domain to be
> released.
>
> Release the callback_data domain reference in tb_dp_dprx_stop() when the
> DPRX work is canceled, mirroring the release done by the callback.
>
> Fixes: d6d458d42e1e ("thunderbolt: Handle DisplayPort tunnel activation asynchronously")
> Cc: stable@vger.kernel.org
> Signed-off-by: David Medina <b2amedina@gmail.com>
This should be fixed already by the patches in my fixes branch, can you
try?
https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git/log/?h=fixes
next prev parent reply other threads:[~2026-10-01 3:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 2:16 David Medina via B4 Relay
2026-10-01 3:48 ` Mika Westerberg [this message]
2026-10-01 23:57 ` David Medina
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=20261001034839.GA176164@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=b2amedina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.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®