]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thunderbolt: Wait for tb_domain_release() to complete when driver is removed
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 19 Nov 2025 10:53:58 +0000 (12:53 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 5 May 2026 11:53:46 +0000 (13:53 +0200)
commitf5cc545f59699549adbaa4084149f8247865a51d
treef15dcb730f487d59f5a1b7dc237dfea8a8241583
parente56249d8a68e712f3b60e1f3fdbb5b4fea146468
thunderbolt: Wait for tb_domain_release() to complete when driver is removed

We should not call nhi_shutdown() before the domain structure and the
control channel rings are completely released. Otherwise we might
release resources like the nhi->msix_ida that are still referenced in
tb_domain_release(). For this reason wait for the tb_domain_release() to
be completed before continuing to nhi_shutdown() and eventually
releasing of the rest of the data structures.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/domain.c
drivers/thunderbolt/nhi.c
include/linux/thunderbolt.h