Re: [PATCH] net: mana: Fix memory leak in mana_gd_setup_irqs

2024-12-03 Thread Maxim Levitsky
On Tue, 2024-12-03 at 16:21 +, Simon Horman wrote: > On Thu, Nov 28, 2024 at 09:49:35PM +, Michael Kelley wrote: > > From: Maxim Levitsky Sent: Thursday, November 28, > > 2024 11:43 AM > > > Commit 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores") > > > added memory allocatio

Re: [PATCH] net: mana: Fix memory leak in mana_gd_setup_irqs

2024-12-03 Thread Simon Horman
On Thu, Nov 28, 2024 at 09:49:35PM +, Michael Kelley wrote: > From: Maxim Levitsky Sent: Thursday, November 28, 2024 > 11:43 AM > > > > Commit 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores") > > added memory allocation in mana_gd_setup_irqs of 'irqs' but the code > > doesn't f

Re: [PATCH] net: mana: Fix memory leak in mana_gd_setup_irqs

2024-11-30 Thread Jakub Kicinski
On Thu, 28 Nov 2024 18:13:25 -0800 Yury Norov wrote: > > FWIW, there's a related error path leak. If the kcalloc() to populate > > gc->irq_contexts fails, the irqs array is not freed. Probably could > > extend this patch to fix that leak as well. > > > > Michael > > That's why we've got a __fre

Re: [PATCH] net: mana: Fix memory leak in mana_gd_setup_irqs

2024-11-28 Thread Yury Norov
On Thu, Nov 28, 2024 at 09:49:35PM +, Michael Kelley wrote: > From: Maxim Levitsky Sent: Thursday, November 28, 2024 > 11:43 AM > > > > Commit 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores") > > added memory allocation in mana_gd_setup_irqs of 'irqs' but the code > > doesn't f

RE: [PATCH] net: mana: Fix memory leak in mana_gd_setup_irqs

2024-11-28 Thread Michael Kelley
From: Maxim Levitsky Sent: Thursday, November 28, 2024 11:43 AM > > Commit 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores") > added memory allocation in mana_gd_setup_irqs of 'irqs' but the code > doesn't free this temporary array in the success path. > > This was caught by kmemle