]> git.ipfire.org Git - thirdparty/linux.git/commit
accel/qaic: Handle DBC deactivation if the owner went away
authorYoussef Samir <youssef.abdulrahman@oss.qualcomm.com>
Thu, 5 Feb 2026 12:34:14 +0000 (13:34 +0100)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Fri, 27 Mar 2026 16:48:30 +0000 (10:48 -0600)
commit2feec5ae5df785658924ab6bd91280dc3926507c
tree570f10eebd014d315218f7ddaad48b079818fcd0
parent45ebe43ea00d6b9f5b3e0db9c35b8ca2a96b7e70
accel/qaic: Handle DBC deactivation if the owner went away

When a DBC is released, the device sends a QAIC_TRANS_DEACTIVATE_FROM_DEV
transaction to the host over the QAIC_CONTROL MHI channel. QAIC handles
this by calling decode_deactivate() to release the resources allocated for
that DBC. Since that handling is done in the qaic_manage_ioctl() context,
if the user goes away before receiving and handling the deactivation, the
host will be out-of-sync with the DBCs available for use, and the DBC
resources will not be freed unless the device is removed. If another user
loads and requests to activate a network, then the device assigns the same
DBC to that network, QAIC will "indefinitely" wait for dbc->in_use = false,
leading the user process to hang.

As a solution to this, handle QAIC_TRANS_DEACTIVATE_FROM_DEV transactions
that are received after the user has gone away.

Fixes: 129776ac2e38 ("accel/qaic: Add control path")
Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patch.msgid.link/20260205123415.3870898-1-youssef.abdulrahman@oss.qualcomm.com
drivers/accel/qaic/qaic_control.c