Re: [PATCH] thermal: qcom: tsens: Fix potential repeated removal of shared debugfs root
From: Konrad Dybcio
Date: Mon Nov 30 2026 - 06:15:21 EST
On 11/20/26 6:35 PM, Guangshuo Li wrote:
> Each TSENS instance stores the same debugfs root and removes it during
> teardown. Removing one instance therefore removes the files of its
> peers, and subsequent removal operates on the same root again.
>
> Own the root at driver initialization and exit. Each instance only
> removes its own directory, leaving the shared root to the driver.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: 7c938f4837ab ("drivers: thermal: tsens: Add debugfs support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Guangshuo Li <liguangshuo@xxxxxxxxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad