From b1789adbace35bbe06cd433e305a776e3e4bb1db Mon Sep 17 00:00:00 2001 From: yizhou Date: Wed, 21 May 2025 01:12:25 +0000 Subject: [PATCH] kmd: disable the panic_callback Disable the panic_callback function as a workaround for bug 5293085. when panic_callback() is called from an atomic context, it tries to do something that could sleep (e.g. calling mutex_lock when the mutex is contended). Bug 5293085 Change-Id: I822bd72fdbedcaa9201086dae991da36f34df8fa Signed-off-by: yizhou Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368091 GVS: buildbot_gerritrpt Reviewed-by: Alex Waterman Reviewed-by: Mohit Ingale Tested-by: Alex Waterman Reviewed-by: Chinniah Poosapadi --- drivers/platform/tegra/rtcpu/hsp-mailbox-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/tegra/rtcpu/hsp-mailbox-client.c b/drivers/platform/tegra/rtcpu/hsp-mailbox-client.c index c218d47d..be24828b 100644 --- a/drivers/platform/tegra/rtcpu/hsp-mailbox-client.c +++ b/drivers/platform/tegra/rtcpu/hsp-mailbox-client.c @@ -243,7 +243,8 @@ static void camrtc_hsp_rx_full_notify(mbox_client *cl, void *data) } else if (CAMRTC_HSP_MSG_ID(msg) == CAMRTC_HSP_PANIC) { dev_err(&camhsp->dev, "%s: receive CAMRTC_HSP_PANIC message!\n", __func__); if (camhsp->panic_callback != NULL) { - camhsp->panic_callback(camhsp->dev.parent); + // disable panic_callback as the workaround for https://nvbugspro.nvidia.com/bug/5293085 + //camhsp->panic_callback(camhsp->dev.parent); } else { dev_warn(&camhsp->dev, "%s: No panic callback function is registered.\n", __func__); }