summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNikhil P. Rao <nikhil.rao@amd.com>2026-05-15 21:29:07 +0000
committerJakub Kicinski <kuba@kernel.org>2026-05-19 19:18:33 -0700
commitdc416e32baaeb620b9809e9e25fc7b30889686e9 (patch)
treea67f5770c2fb9bced9157799c817f37a469607f0 /include
parent0e46b6635b03d29807f810c3b415c4755a3f958d (diff)
pds_core: fix debugfs_lookup dentry leak and error handling
debugfs_lookup() returns a dentry with an elevated reference count that must be released with dput(). The current code discards the returned dentry without calling dput(), causing a reference leak on every firmware reset recovery. Additionally, when CONFIG_DEBUG_FS is disabled, debugfs_lookup() returns ERR_PTR(-ENODEV), not NULL. The current check passes for error pointers and would call dput() on an invalid pointer, causing a crash. Fixes: bc90fbe0c318 ("pds_core: Rework teardown/setup flow to be more common") Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com> Link: https://patch.msgid.link/20260515212907.998028-3-nikhil.rao@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions