Commit 7f71acd
idpf: fix memleak in vport interrupt configuration
commit 3cc88e8 upstream.
The initialization of vport interrupt consists of two functions:
1) idpf_vport_intr_init() where a generic configuration is done
2) idpf_vport_intr_req_irq() where the irq for each q_vector is
requested.
The first function used to create a base name for each interrupt using
"kasprintf()" call. Unfortunately, although that call allocated memory
for a text buffer, that memory was never released.
Fix this by removing creating the interrupt base name in 1).
Instead, always create a full interrupt name in the function 2), because
there is no need to create a base name separately, considering that the
function 2) is never called out of idpf_vport_intr_init() context.
Fixes: d4d5587 ("idpf: initialize interrupts and enable vport")
Cc: stable@vger.kernel.org # 6.7
Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20240806220923.3359860-3-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3831170 commit 7f71acd
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3614 | 3614 | | |
3615 | 3615 | | |
3616 | 3616 | | |
3617 | | - | |
3618 | 3617 | | |
3619 | | - | |
| 3618 | + | |
3620 | 3619 | | |
3621 | 3620 | | |
| 3621 | + | |
3622 | 3622 | | |
3623 | | - | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
3624 | 3626 | | |
3625 | 3627 | | |
3626 | 3628 | | |
| |||
3637 | 3639 | | |
3638 | 3640 | | |
3639 | 3641 | | |
3640 | | - | |
3641 | | - | |
| 3642 | + | |
| 3643 | + | |
3642 | 3644 | | |
3643 | 3645 | | |
3644 | 3646 | | |
| |||
4148 | 4150 | | |
4149 | 4151 | | |
4150 | 4152 | | |
4151 | | - | |
4152 | 4153 | | |
4153 | 4154 | | |
4154 | 4155 | | |
| |||
4162 | 4163 | | |
4163 | 4164 | | |
4164 | 4165 | | |
4165 | | - | |
4166 | | - | |
4167 | | - | |
4168 | | - | |
4169 | | - | |
| 4166 | + | |
4170 | 4167 | | |
4171 | 4168 | | |
4172 | 4169 | | |
| |||
0 commit comments