]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pds_core: fix memory leak in pdsc_debugfs_add_qcq()
authorAbdun Nihaal <abdun.nihaal@gmail.com>
Wed, 9 Apr 2025 05:44:48 +0000 (11:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:41 +0000 (10:45 +0200)
commit9027e073567091ed62e313012b7f905db81d0cf1
treee1fc0dae7bcb2b50475cb198967bcb2a20e85e5d
parent86dc3a05fa704544b250e49bcabdcc3048ab1ab1
pds_core: fix memory leak in pdsc_debugfs_add_qcq()

[ Upstream commit 8b82f656826c741d032490b089a5638c33f2c91d ]

The memory allocated for intr_ctrl_regset, which is passed to
debugfs_create_regset32() may not be cleaned up when the driver is
removed. Fix that by using device managed allocation for it.

Fixes: 45d76f492938 ("pds_core: set up device and adminq")
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://patch.msgid.link/20250409054450.48606-1-abdun.nihaal@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amd/pds_core/debugfs.c