diff mbox

[v2,1/4] ntb: Fix leakage of ntb_device::msix_entries[] array

Message ID 7f4150adb1b01e79555af6a9e13f1c0e0df6fdac.1392996332.git.agordeev@redhat.com
State Not Applicable
Headers show

Commit Message

Alexander Gordeev Feb. 21, 2014, 3:49 p.m. UTC
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Jon Mason <jon.mason@intel.com>
Cc: linux-pci@vger.kernel.org
---
 drivers/ntb/ntb_hw.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Jon Mason Feb. 21, 2014, 11:33 p.m. UTC | #1
On Fri, Feb 21, 2014 at 04:49:29PM +0100, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Cc: Jon Mason <jon.mason@intel.com>
> Cc: linux-pci@vger.kernel.org

Good catch.  Applied.

> ---
>  drivers/ntb/ntb_hw.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> index 170e8e6..487169dd 100644
> --- a/drivers/ntb/ntb_hw.c
> +++ b/drivers/ntb/ntb_hw.c
> @@ -1281,6 +1281,7 @@ static void ntb_free_interrupts(struct ntb_device *ndev)
>  				free_irq(msix->vector, &ndev->db_cb[i]);
>  		}
>  		pci_disable_msix(pdev);
> +		kfree(ndev->msix_entries);
>  	} else {
>  		free_irq(pdev->irq, ndev);
>  
> -- 
> 1.7.7.6
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexander Gordeev Feb. 28, 2014, 11:35 a.m. UTC | #2
On Fri, Feb 21, 2014 at 04:33:25PM -0700, Jon Mason wrote:
> On Fri, Feb 21, 2014 at 04:49:29PM +0100, Alexander Gordeev wrote:
> > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > Cc: Jon Mason <jon.mason@intel.com>
> > Cc: linux-pci@vger.kernel.org
> 
> Good catch.  Applied.

Hi Jon,

If the other three patches are okay?
diff mbox

Patch

diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index 170e8e6..487169dd 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -1281,6 +1281,7 @@  static void ntb_free_interrupts(struct ntb_device *ndev)
 				free_irq(msix->vector, &ndev->db_cb[i]);
 		}
 		pci_disable_msix(pdev);
+		kfree(ndev->msix_entries);
 	} else {
 		free_irq(pdev->irq, ndev);