diff options
| author | Pei Xiao <xiaopei01@kylinos.cn> | 2026-10-03 16:27:53 +0800 |
|---|---|---|
| committer | Jarkko Sakkinen <jarkko@kernel.org> | 2026-10-23 00:59:20 +0300 |
| commit | df0ef271087623439a1e900f323ed2a57204706d (patch) | |
| tree | ef70397e7d0735ad58cdfae008fd93e3ac1c75f3 /tools/perf/scripts/python/bin/task-analyzer-report | |
| parent | 1900449684cf71427a51e0bb1d7914c0c8b39152 (diff) | |
tpm: tpm_nsc: stop using the cleanup callback as dev.release
tpm_nsc_remove() is called explicitly from cleanup_nsc() and also
runs as the platform device release callback on the final
platform_device_put(), so the cleanup executes twice on module
exit; the second invocation operates on a chip that has already
been freed by the devm cleanup, and the I/O region is released
twice.
Overwriting the release callback installed by
platform_device_alloc() also keeps platform_device_release() from
running, leaking the platform object allocation.
Leave the default release callback in place; the explicit call in
cleanup_nsc() remains the single cleanup point.
Cc: stable@vger.kernel.org
Fixes: 570302a31149 ("[PATCH] tpm: move nsc driver off pci_dev")
Assisted-by: GLM-5.3
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/r/a6155310e6772f708b47291cc959e02c05b90eb7.1791015549.git.xiaopei01@kylinos.cn
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/task-analyzer-report')
0 files changed, 0 insertions, 0 deletions
