diff options
| author | Shuai Xue <xueshuai@linux.alibaba.com> | 2025-04-04 20:02:14 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-22 14:31:56 +0200 |
| commit | 4f005eb68890698e5abc6a3af04dab76f175c50c (patch) | |
| tree | 277876e8a07fa3950a63dd826136eb76fd1320c2 /include/net/aligned_data.h | |
| parent | 2b7a961cea0e5b65afda911f76d14fec5c98d024 (diff) | |
dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
commit 46a5cca76c76c86063000a12936f8e7875295838 upstream.
Memory allocated for idxd is not freed if an error occurs during
idxd_alloc(). To fix it, free the allocated memory in the reverse order
of allocation before exiting the function in case of an error.
Fixes: a8563a33a5e2 ("dmanegine: idxd: reformat opcap output to match bitmap_parse() input")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Link: https://lore.kernel.org/r/20250404120217.48772-7-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
