netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
@ 2007-10-28  8:05 Sivakumar Subramani
  2007-10-29  9:55 ` Jeff Garzik
  0 siblings, 1 reply; 9+ messages in thread
From: Sivakumar Subramani @ 2007-10-28  8:05 UTC (permalink / raw)
  To: jeff, netdev; +Cc: support

- Fixed memory leak by freeing MSI-X local entry memories when vector allocation
fails in s2io_add_isr.
- Added two utility functions do_rem_msix_isr and do_rem_inta_isr to eliminate
code duplication.

Signed-off-by: Veena Parat <veena.parat@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
---
diff -Nurp 2-0-26-6/drivers/net/s2io.c 2-0-26-7/drivers/net/s2io.c
--- 2-0-26-6/drivers/net/s2io.c	2007-10-24 09:20:39.000000000 -0700
+++ 2-0-26-7/drivers/net/s2io.c	2007-10-24 09:46:16.000000000 -0700
@@ -84,7 +84,7 @@
 #include "s2io.h"
 #include "s2io-regs.h"
 
-#define DRV_VERSION "2.0.26.6"
+#define DRV_VERSION "2.0.26.7"
 
 /* S2io Driver name & version. */
 static char s2io_driver_name[] = "Neterion";
@@ -3775,6 +3775,46 @@ static int __devinit s2io_test_msi(struc
 
 	return err;
 }
+
+static void do_rem_msix_isr(struct s2io_nic * sp)
+{
+	struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
+	int i;
+	u16 msi_control;
+
+	for (i=1; (sp->s2io_entries[i].in_use ==
+		MSIX_REGISTERED_SUCCESS); i++) {
+		int vector = sp->entries[i].vector;
+		void *arg = sp->s2io_entries[i].arg;
+
+		synchronize_irq(vector);
+		free_irq(vector, arg);
+	}
+
+	kfree(sp->entries);
+	stats->mem_freed +=
+		(MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
+	kfree(sp->s2io_entries);
+	stats->mem_freed +=
+		(MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
+	sp->entries = NULL;
+	sp->s2io_entries = NULL;
+
+	pci_read_config_word(sp->pdev, 0x42, &msi_control);
+	msi_control &= 0xFFFE; /* Disable MSI */
+	pci_write_config_word(sp->pdev, 0x42, msi_control);
+
+	pci_disable_msix(sp->pdev);
+}
+
+static void do_rem_inta_isr(struct s2io_nic * sp)
+{
+	struct net_device *dev = sp->dev;
+
+	synchronize_irq(sp->pdev->irq);
+	free_irq(sp->pdev->irq, dev);
+}
+
 /* ********************************************************* *
  * Functions defined below concern the OS part of the driver *
  * ********************************************************* */
@@ -3809,28 +3849,11 @@ static int s2io_open(struct net_device *
 		int ret = s2io_enable_msi_x(sp);
 
 		if (!ret) {
-			u16 msi_control;
 
 			ret = s2io_test_msi(sp);
 
 			/* rollback MSI-X, will re-enable during add_isr() */
-			kfree(sp->entries);
-			sp->mac_control.stats_info->sw_stat.mem_freed +=
-				(MAX_REQUESTED_MSI_X *
-				sizeof(struct msix_entry));
-			kfree(sp->s2io_entries);
-			sp->mac_control.stats_info->sw_stat.mem_freed +=
-				(MAX_REQUESTED_MSI_X *
-				sizeof(struct s2io_msix_entry));
-			sp->entries = NULL;
-			sp->s2io_entries = NULL;
-
-			pci_read_config_word(sp->pdev, 0x42, &msi_control);
-			msi_control &= 0xFFFE; /* Disable MSI */
-			pci_write_config_word(sp->pdev, 0x42, msi_control);
-
-			pci_disable_msix(sp->pdev);
-
+			do_rem_msix_isr(sp);
 		}
 		if (ret) {
 
@@ -6864,15 +6887,22 @@ static int s2io_add_isr(struct s2io_nic 
 				}
 			}
 			if (err) {
+				do_rem_msix_isr(sp);
+
 				DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration "
 					  "failed\n", dev->name, i);
-				DBG_PRINT(ERR_DBG, "Returned: %d\n", err);
-				return -1;
+
+				DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n",
+					dev->name);
+				sp->config.intr_type = INTA;
+				break;
 			}
 			sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
 		}
-		printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt);
-		printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt);
+		if(!err) {
+			printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt);
+			printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt);
+		}
 	}
 	if (sp->config.intr_type == INTA) {
 		err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
@@ -6887,40 +6917,10 @@ static int s2io_add_isr(struct s2io_nic 
 }
 static void s2io_rem_isr(struct s2io_nic * sp)
 {
-	struct net_device *dev = sp->dev;
-	struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
-
-	if (sp->config.intr_type == MSI_X) {
-		int i;
-		u16 msi_control;
-
-		for (i=1; (sp->s2io_entries[i].in_use ==
-			MSIX_REGISTERED_SUCCESS); i++) {
-			int vector = sp->entries[i].vector;
-			void *arg = sp->s2io_entries[i].arg;
-
-			synchronize_irq(vector);
-			free_irq(vector, arg);
-		}
-
-		kfree(sp->entries);
-		stats->mem_freed +=
-			(MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
-		kfree(sp->s2io_entries);
-		stats->mem_freed +=
-			(MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
-		sp->entries = NULL;
-		sp->s2io_entries = NULL;
-
-		pci_read_config_word(sp->pdev, 0x42, &msi_control);
-		msi_control &= 0xFFFE; /* Disable MSI */
-		pci_write_config_word(sp->pdev, 0x42, msi_control);
-
-		pci_disable_msix(sp->pdev);
-	} else {
-		synchronize_irq(sp->pdev->irq);
-		free_irq(sp->pdev->irq, dev);
-	}
+	if (sp->config.intr_type == MSI_X)
+		do_rem_msix_isr(sp);
+	else
+		do_rem_inta_isr(sp);
 }
 
 static void do_s2io_card_down(struct s2io_nic * sp, int do_io)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
  2007-10-28  8:05 Sivakumar Subramani
@ 2007-10-29  9:55 ` Jeff Garzik
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2007-10-29  9:55 UTC (permalink / raw)
  To: Sivakumar Subramani; +Cc: netdev, support

Sivakumar Subramani wrote:
> - Fixed memory leak by freeing MSI-X local entry memories when vector allocation
> fails in s2io_add_isr.
> - Added two utility functions do_rem_msix_isr and do_rem_inta_isr to eliminate
> code duplication.
> 
> Signed-off-by: Veena Parat <veena.parat@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>

Comments:

1) stats->mem_freed is redundant to general kernel debugging facilities

2) synchronize_irq() is redundant, free_irq() does same

3) "rem" isn't very clear.  few if any other kernel drivers use this to 
indicate "remove"

4) "do_" prefix is redundant

5) scripts/checkpatch.pl fails on this patch.  please clean up problems.

The main issue for this patch is #2, though presumably the other stuff 
can be cleaned on the next resubmit



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
@ 2007-10-31  8:10 Sreenivasa Honnur
  2007-11-06 17:46 ` Jeff Garzik
  0 siblings, 1 reply; 9+ messages in thread
From: Sreenivasa Honnur @ 2007-10-31  8:10 UTC (permalink / raw)
  To: netdev, jeff; +Cc: support

- Fixed memory leak by freeing MSI-X local entry memories when vector allocation
fails in s2io_add_isr.
- Added two utility functions remove_msix_isr and remove_inta_isr to eliminate
code duplication.
- Implemented following review comments from Jeff
	- Removed redundant stats->mem_freed and synchronize_irq call
	- do_rem_msix_isr is renamed as remove_msix_isr
	- do_rem_inta_isr is renamed as remove_inta_isr

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
---
diff -Nurp org/drivers/net/s2io.c patch1/drivers/net/s2io.c
--- org/drivers/net/s2io.c	2007-10-30 23:31:09.000000000 +0530
+++ patch1/drivers/net/s2io.c	2007-10-31 04:12:00.000000000 +0530
@@ -84,7 +84,7 @@
 #include "s2io.h"
 #include "s2io-regs.h"
 
-#define DRV_VERSION "2.0.26.6"
+#define DRV_VERSION "2.0.26.7"
 
 /* S2io Driver name & version. */
 static char s2io_driver_name[] = "Neterion";
@@ -3775,6 +3775,40 @@ static int __devinit s2io_test_msi(struc
 
 	return err;
 }
+
+static void remove_msix_isr(struct s2io_nic *sp)
+{
+	int i;
+	u16 msi_control;
+
+	for (i = 0; i < MAX_REQUESTED_MSI_X; i++) {
+		if (sp->s2io_entries[i].in_use ==
+			MSIX_REGISTERED_SUCCESS) {
+			int vector = sp->entries[i].vector;
+			void *arg = sp->s2io_entries[i].arg;
+			free_irq(vector, arg);
+		}
+	}
+
+	kfree(sp->entries);
+	kfree(sp->s2io_entries);
+	sp->entries = NULL;
+	sp->s2io_entries = NULL;
+
+	pci_read_config_word(sp->pdev, 0x42, &msi_control);
+	msi_control &= 0xFFFE; /* Disable MSI */
+	pci_write_config_word(sp->pdev, 0x42, msi_control);
+
+	pci_disable_msix(sp->pdev);
+}
+
+static void remove_inta_isr(struct s2io_nic *sp)
+{
+	struct net_device *dev = sp->dev;
+
+	free_irq(sp->pdev->irq, dev);
+}
+
 /* ********************************************************* *
  * Functions defined below concern the OS part of the driver *
  * ********************************************************* */
@@ -3809,28 +3843,9 @@ static int s2io_open(struct net_device *
 		int ret = s2io_enable_msi_x(sp);
 
 		if (!ret) {
-			u16 msi_control;
-
 			ret = s2io_test_msi(sp);
-
 			/* rollback MSI-X, will re-enable during add_isr() */
-			kfree(sp->entries);
-			sp->mac_control.stats_info->sw_stat.mem_freed +=
-				(MAX_REQUESTED_MSI_X *
-				sizeof(struct msix_entry));
-			kfree(sp->s2io_entries);
-			sp->mac_control.stats_info->sw_stat.mem_freed +=
-				(MAX_REQUESTED_MSI_X *
-				sizeof(struct s2io_msix_entry));
-			sp->entries = NULL;
-			sp->s2io_entries = NULL;
-
-			pci_read_config_word(sp->pdev, 0x42, &msi_control);
-			msi_control &= 0xFFFE; /* Disable MSI */
-			pci_write_config_word(sp->pdev, 0x42, msi_control);
-
-			pci_disable_msix(sp->pdev);
-
+			remove_msix_isr(sp);
 		}
 		if (ret) {
 
@@ -6864,15 +6879,23 @@ static int s2io_add_isr(struct s2io_nic 
 				}
 			}
 			if (err) {
+				remove_msix_isr(sp);
+
 				DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration "
 					  "failed\n", dev->name, i);
-				DBG_PRINT(ERR_DBG, "Returned: %d\n", err);
-				return -1;
+				DBG_PRINT(ERR_DBG, "%s: defaulting to INTA\n",
+					dev->name);
+				sp->config.intr_type = INTA;
+				break;
 			}
 			sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
 		}
-		printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt);
-		printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt);
+		if (!err) {
+			DBG_PRINT(INFO_DBG, "MSI-X-TX %d entries enabled\n",
+				msix_tx_cnt);
+			DBG_PRINT(INFO_DBG, "MSI-X-RX %d entries enabled\n",
+				msix_rx_cnt);
+		}
 	}
 	if (sp->config.intr_type == INTA) {
 		err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
@@ -6887,40 +6910,10 @@ static int s2io_add_isr(struct s2io_nic 
 }
 static void s2io_rem_isr(struct s2io_nic * sp)
 {
-	struct net_device *dev = sp->dev;
-	struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
-
-	if (sp->config.intr_type == MSI_X) {
-		int i;
-		u16 msi_control;
-
-		for (i=1; (sp->s2io_entries[i].in_use ==
-			MSIX_REGISTERED_SUCCESS); i++) {
-			int vector = sp->entries[i].vector;
-			void *arg = sp->s2io_entries[i].arg;
-
-			synchronize_irq(vector);
-			free_irq(vector, arg);
-		}
-
-		kfree(sp->entries);
-		stats->mem_freed +=
-			(MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
-		kfree(sp->s2io_entries);
-		stats->mem_freed +=
-			(MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
-		sp->entries = NULL;
-		sp->s2io_entries = NULL;
-
-		pci_read_config_word(sp->pdev, 0x42, &msi_control);
-		msi_control &= 0xFFFE; /* Disable MSI */
-		pci_write_config_word(sp->pdev, 0x42, msi_control);
-
-		pci_disable_msix(sp->pdev);
-	} else {
-		synchronize_irq(sp->pdev->irq);
-		free_irq(sp->pdev->irq, dev);
-	}
+	if (sp->config.intr_type == MSI_X)
+		remove_msix_isr(sp);
+	else
+		remove_inta_isr(sp);
 }
 
 static void do_s2io_card_down(struct s2io_nic * sp, int do_io)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
  2007-10-31  8:10 Sreenivasa Honnur
@ 2007-11-06 17:46 ` Jeff Garzik
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2007-11-06 17:46 UTC (permalink / raw)
  To: Sreenivasa Honnur; +Cc: netdev, support

Sreenivasa Honnur wrote:
> - Fixed memory leak by freeing MSI-X local entry memories when vector allocation
> fails in s2io_add_isr.
> - Added two utility functions remove_msix_isr and remove_inta_isr to eliminate
> code duplication.
> - Implemented following review comments from Jeff
> 	- Removed redundant stats->mem_freed and synchronize_irq call
> 	- do_rem_msix_isr is renamed as remove_msix_isr
> 	- do_rem_inta_isr is renamed as remove_inta_isr
> 
> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>

this patch should go into 2.6.24-rc, but it doesn't apply to upstream.

This may be because it requires "S2io: Support for 
add/delete/store/restore ethernet addresses", I am guessing?

We want to reverse the order of those two patches, because "S2io: 
Support for add/delete/store/restore ethernet addresses" is more 
appropriate for non-bug-fix 2.6.24 rather than current bugfix-only 
2.6.24-rc.

	Jeff



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
@ 2007-11-14  9:29 Sreenivasa Honnur
  2007-11-14  9:41 ` David Miller
  2007-11-24  3:03 ` Jeff Garzik
  0 siblings, 2 replies; 9+ messages in thread
From: Sreenivasa Honnur @ 2007-11-14  9:29 UTC (permalink / raw)
  To: netdev, jeff; +Cc: support

- Fixed memory leak by freeing MSI-X local entry memories when vector allocation
fails in s2io_add_isr.
- Added two utility functions remove_msix_isr and remove_inta_isr to eliminate
code duplication.
- Incorporated following review comments from Jeff
        - Removed redundant stats->mem_freed and synchronize_irq call
        - do_rem_msix_isr is renamed as remove_msix_isr
        - do_rem_inta_isr is renamed as remove_inta_isr

- (Resubmit third time)

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -Nurp org/drivers/net/s2io.c patch1/drivers/net/s2io.c
--- org/drivers/net/s2io.c	2007-11-12 22:00:23.000000000 +0530
+++ patch1/drivers/net/s2io.c	2007-11-12 23:53:19.000000000 +0530
@@ -84,7 +84,7 @@
 #include "s2io.h"
 #include "s2io-regs.h"
 
-#define DRV_VERSION "2.0.26.5"
+#define DRV_VERSION "2.0.26.6"
 
 /* S2io Driver name & version. */
 static char s2io_driver_name[] = "Neterion";
@@ -3775,6 +3775,40 @@ static int __devinit s2io_test_msi(struc
 
 	return err;
 }
+
+static void remove_msix_isr(struct s2io_nic *sp)
+{
+	int i;
+	u16 msi_control;
+
+	for (i = 0; i < MAX_REQUESTED_MSI_X; i++) {
+		if (sp->s2io_entries[i].in_use ==
+			MSIX_REGISTERED_SUCCESS) {
+			int vector = sp->entries[i].vector;
+			void *arg = sp->s2io_entries[i].arg;
+			free_irq(vector, arg);
+		}
+	}
+
+	kfree(sp->entries);
+	kfree(sp->s2io_entries);
+	sp->entries = NULL;
+	sp->s2io_entries = NULL;
+
+	pci_read_config_word(sp->pdev, 0x42, &msi_control);
+	msi_control &= 0xFFFE; /* Disable MSI */
+	pci_write_config_word(sp->pdev, 0x42, msi_control);
+
+	pci_disable_msix(sp->pdev);
+}
+
+static void remove_inta_isr(struct s2io_nic *sp)
+{
+	struct net_device *dev = sp->dev;
+
+	free_irq(sp->pdev->irq, dev);
+}
+
 /* ********************************************************* *
  * Functions defined below concern the OS part of the driver *
  * ********************************************************* */
@@ -3809,28 +3843,9 @@ static int s2io_open(struct net_device *
 		int ret = s2io_enable_msi_x(sp);
 
 		if (!ret) {
-			u16 msi_control;
-
 			ret = s2io_test_msi(sp);
-
 			/* rollback MSI-X, will re-enable during add_isr() */
-			kfree(sp->entries);
-			sp->mac_control.stats_info->sw_stat.mem_freed +=
-				(MAX_REQUESTED_MSI_X *
-				sizeof(struct msix_entry));
-			kfree(sp->s2io_entries);
-			sp->mac_control.stats_info->sw_stat.mem_freed +=
-				(MAX_REQUESTED_MSI_X *
-				sizeof(struct s2io_msix_entry));
-			sp->entries = NULL;
-			sp->s2io_entries = NULL;
-
-			pci_read_config_word(sp->pdev, 0x42, &msi_control);
-			msi_control &= 0xFFFE; /* Disable MSI */
-			pci_write_config_word(sp->pdev, 0x42, msi_control);
-
-			pci_disable_msix(sp->pdev);
-
+			remove_msix_isr(sp);
 		}
 		if (ret) {
 
@@ -6719,15 +6734,22 @@ static int s2io_add_isr(struct s2io_nic 
 				}
 			}
 			if (err) {
+				remove_msix_isr(sp);
 				DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration "
 					  "failed\n", dev->name, i);
-				DBG_PRINT(ERR_DBG, "Returned: %d\n", err);
-				return -1;
+				DBG_PRINT(ERR_DBG, "%s: defaulting to INTA\n",
+						 dev->name);
+				sp->config.intr_type = INTA;
+				break;
 			}
 			sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
 		}
-		printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt);
-		printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt);
+		if (!err) {
+			printk(KERN_INFO "MSI-X-TX %d entries enabled\n",
+				msix_tx_cnt);
+			printk(KERN_INFO "MSI-X-RX %d entries enabled\n",
+				msix_rx_cnt);
+		}
 	}
 	if (sp->config.intr_type == INTA) {
 		err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
@@ -6742,40 +6764,10 @@ static int s2io_add_isr(struct s2io_nic 
 }
 static void s2io_rem_isr(struct s2io_nic * sp)
 {
-	struct net_device *dev = sp->dev;
-	struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
-
-	if (sp->config.intr_type == MSI_X) {
-		int i;
-		u16 msi_control;
-
-		for (i=1; (sp->s2io_entries[i].in_use ==
-			MSIX_REGISTERED_SUCCESS); i++) {
-			int vector = sp->entries[i].vector;
-			void *arg = sp->s2io_entries[i].arg;
-
-			synchronize_irq(vector);
-			free_irq(vector, arg);
-		}
-
-		kfree(sp->entries);
-		stats->mem_freed +=
-			(MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
-		kfree(sp->s2io_entries);
-		stats->mem_freed +=
-			(MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
-		sp->entries = NULL;
-		sp->s2io_entries = NULL;
-
-		pci_read_config_word(sp->pdev, 0x42, &msi_control);
-		msi_control &= 0xFFFE; /* Disable MSI */
-		pci_write_config_word(sp->pdev, 0x42, msi_control);
-
-		pci_disable_msix(sp->pdev);
-	} else {
-		synchronize_irq(sp->pdev->irq);
-		free_irq(sp->pdev->irq, dev);
-	}
+	if (sp->config.intr_type == MSI_X)
+		remove_msix_isr(sp);
+	else
+		remove_inta_isr(sp);
 }
 
 static void do_s2io_card_down(struct s2io_nic * sp, int do_io)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
  2007-11-14  9:29 [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails Sreenivasa Honnur
@ 2007-11-14  9:41 ` David Miller
  2007-11-24  3:03 ` Jeff Garzik
  1 sibling, 0 replies; 9+ messages in thread
From: David Miller @ 2007-11-14  9:41 UTC (permalink / raw)
  To: Sreenivasa.Honnur; +Cc: netdev, jeff, support

From: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Date: Wed, 14 Nov 2007 04:29:07 -0500 (EST)

> - Fixed memory leak by freeing MSI-X local entry memories when vector allocation
> fails in s2io_add_isr.
> - Added two utility functions remove_msix_isr and remove_inta_isr to eliminate
> code duplication.
> - Incorporated following review comments from Jeff
>         - Removed redundant stats->mem_freed and synchronize_irq call
>         - do_rem_msix_isr is renamed as remove_msix_isr
>         - do_rem_inta_isr is renamed as remove_inta_isr
> 
> - (Resubmit third time)
> 
> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>

Applied to net-2.6, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
  2007-11-14  9:29 [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails Sreenivasa Honnur
  2007-11-14  9:41 ` David Miller
@ 2007-11-24  3:03 ` Jeff Garzik
  2007-11-24  5:48   ` Ramkrishna Vepa
  1 sibling, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2007-11-24  3:03 UTC (permalink / raw)
  To: Sreenivasa Honnur; +Cc: netdev, support

Sreenivasa Honnur wrote:
> - Fixed memory leak by freeing MSI-X local entry memories when vector allocation
> fails in s2io_add_isr.
> - Added two utility functions remove_msix_isr and remove_inta_isr to eliminate
> code duplication.
> - Incorporated following review comments from Jeff
>         - Removed redundant stats->mem_freed and synchronize_irq call
>         - do_rem_msix_isr is renamed as remove_msix_isr
>         - do_rem_inta_isr is renamed as remove_inta_isr
> 
> - (Resubmit third time)

ditto, does not apply



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
  2007-11-24  3:03 ` Jeff Garzik
@ 2007-11-24  5:48   ` Ramkrishna Vepa
  2007-11-24  6:56     ` Jeff Garzik
  0 siblings, 1 reply; 9+ messages in thread
From: Ramkrishna Vepa @ 2007-11-24  5:48 UTC (permalink / raw)
  To: Jeff Garzik, Sreenivasa Honnur; +Cc: netdev, support

Jeff,

We got an ACK back last week from Dave Miller that the following 2
patches were already applied - reply follows.

" > [Ram] The version numbers are different for the 2 patches. Was the 
> MSI-X leak bug fix applied prior to resubmission (we had swapped the 
> version numbers on the patches for resubmission).
> 
> [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry

> memories when vector allocation fails
> +#define DRV_VERSION "2.0.26.6"
> 
> [PATCH 2.6.24 1/1]S2io: Support for add/delete/store/restore ethernet 
> addresses
> +#define DRV_VERSION "2.0.26.7"

I applied only the leak fix to the stable branch, and only the ethernet
address support patch to the 2.6.25 development tree.

The bug fix will show up later when the 2.6.25 development tree gets
rebased to upstream (which will have the leak fix by then).

This is how I do things, and that's why changing the DRV_VERSION to
2.0.26.7 made no sense.

Therefore it makes the most sense to bump driver version numbers only
when things are entirely self contained."

Ram
> -----Original Message-----
> From: Jeff Garzik [mailto:jeff@garzik.org]
> Sent: Friday, November 23, 2007 7:03 PM
> To: Sreenivasa Honnur
> Cc: netdev@vger.kernel.org; support
> Subject: Re: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing
MSI-X
> local entry memories when vector allocation fails
> 
> Sreenivasa Honnur wrote:
> > - Fixed memory leak by freeing MSI-X local entry memories when
vector
> allocation
> > fails in s2io_add_isr.
> > - Added two utility functions remove_msix_isr and remove_inta_isr to
> eliminate
> > code duplication.
> > - Incorporated following review comments from Jeff
> >         - Removed redundant stats->mem_freed and synchronize_irq
call
> >         - do_rem_msix_isr is renamed as remove_msix_isr
> >         - do_rem_inta_isr is renamed as remove_inta_isr
> >
> > - (Resubmit third time)
> 
> ditto, does not apply
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails
  2007-11-24  5:48   ` Ramkrishna Vepa
@ 2007-11-24  6:56     ` Jeff Garzik
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2007-11-24  6:56 UTC (permalink / raw)
  To: Ramkrishna Vepa; +Cc: Sreenivasa Honnur, netdev, support

Ramkrishna Vepa wrote:
> Jeff,
> 
> We got an ACK back last week from Dave Miller that the following 2
> patches were already applied - reply follows.

whoops sorry, I see that now.  yep, they are applied.

	Jeff




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-11-24  6:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14  9:29 [PATCH 2.6.24 1/1]S2io: Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails Sreenivasa Honnur
2007-11-14  9:41 ` David Miller
2007-11-24  3:03 ` Jeff Garzik
2007-11-24  5:48   ` Ramkrishna Vepa
2007-11-24  6:56     ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-10-31  8:10 Sreenivasa Honnur
2007-11-06 17:46 ` Jeff Garzik
2007-10-28  8:05 Sivakumar Subramani
2007-10-29  9:55 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).