[openib-general] [PATCH] IPoIB network interface "RUNNING" statuswith the cable disconnected - fix

Leonid Arsh leonida at voltaire.com
Wed Mar 22 09:54:24 PST 2006


 Ronald,
     because of your remark, I'm resending you the small patch again. I
found wrong whitespaces there.




Signed-off-by: Leonid Arsh <leonida at voltaire.com>

Index: linux-kernel/infiniband/ulp/ipoib/ipoib_verbs.c
===================================================================
--- linux-kernel/infiniband/ulp/ipoib/ipoib_verbs.c	(revision 8501)
+++ linux-kernel/infiniband/ulp/ipoib/ipoib_verbs.c	(working copy)
@@ -251,10 +251,11 @@
 	struct ipoib_dev_priv *priv =
 		container_of(handler, struct ipoib_dev_priv,
event_handler);
 
-	if (record->event == IB_EVENT_PORT_ACTIVE ||
+	if (record->event == IB_EVENT_PORT_ERR    ||
+	    record->event == IB_EVENT_PORT_ACTIVE ||
 	    record->event == IB_EVENT_LID_CHANGE  ||
 	    record->event == IB_EVENT_SM_CHANGE) {
-		ipoib_dbg(priv, "Port active event\n");
+		ipoib_dbg(priv, "Port state change event\n");
 		schedule_work(&priv->flush_task);
 	}
 }






-----Original Message-----
From: openib-general-bounces at openib.org
[mailto:openib-general-bounces at openib.org] On Behalf Of Leonid Arsh
Sent: Sunday, March 19, 2006 4:53 PM
To: openib-general at openib.org
Subject: [openib-general] [PATCH] IPoIB network interface "RUNNING"
statuswith the cable disconnected - fix

Sorry, the same message, but with a subject.
  
Hello,

   the patch fixes a problem with the network interface "RUNNING"
status.
   The problem was  that the status stayed  "RUNNING" with the cable
disconnected,
   both for ib0 network interface and a vlan (partition) child device
(like ib0.f1f1)

   The patch causes the network interface device to be flushed when
cable is disconnected.

   This patch requires also my previous patch to be applied (ipoib_ib.c
- wrong pointer memory access bug fix), see below.


Signed-off-by: Leonid Arsh <leonida at voltaire.com>

 Index: infiniband/ulp/ipoib/ipoib_verbs.c
===================================================================
--- infiniband/ulp/ipoib/ipoib_verbs.c	(revision 8499)
+++ infiniband/ulp/ipoib/ipoib_verbs.c	(working copy)
@@ -251,10 +251,11 @@
 	struct ipoib_dev_priv *priv =
 		container_of(handler, struct ipoib_dev_priv,
event_handler);
 
-	if (record->event == IB_EVENT_PORT_ACTIVE ||
+        if (record->event == IB_EVENT_PORT_ERR    ||
+            record->event == IB_EVENT_PORT_ACTIVE ||
 	    record->event == IB_EVENT_LID_CHANGE  ||
 	    record->event == IB_EVENT_SM_CHANGE) {
-		ipoib_dbg(priv, "Port active event\n");
+		ipoib_dbg(priv, "Port state change event\n");
 		schedule_work(&priv->flush_task);
 	}
 }



-----Original Message-----
From: openib-general-bounces at openib.org
[mailto:openib-general-bounces at openib.org] On Behalf Of Leonid Arsh
Sent: Sunday, March 19, 2006 4:03 PM
To: openib-general at openib.org
Subject: [openib-general] [PATCH] ipoib_ib.c - wrong pointer memory
accessbug

Hello,
   Trying to understand the problem with "RUNNING" network interface
status when a cable is disconnected, I found an error in
ipoib_ib_dev_flush() function.
   Although this patch doesn't fix the "RUNNING" status problem yet, it
fixes a serious wrong pointer memory access bug.

 Signed-off-by: Leonid Arsh <leonida at voltaire.com>

Index: infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- infiniband/ulp/ipoib/ipoib_ib.c	(revision 8499)
+++ infiniband/ulp/ipoib/ipoib_ib.c	(working copy)
@@ -603,7 +603,7 @@
 
 	/* Flush any child interfaces too */
 	list_for_each_entry(cpriv, &priv->child_intfs, list)
-		ipoib_ib_dev_flush(&cpriv->dev);
+		ipoib_ib_dev_flush(cpriv->dev);
 
 	mutex_unlock(&priv->vlan_mutex);
 }
_______________________________________________
openib-general mailing list
openib-general at openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general
_______________________________________________
openib-general mailing list
openib-general at openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list