Patchwork [2/5] ctcm: avoid crash in ctcm_remove_device

login
register
mail settings
Submitter frank.blaschka@de.ibm.com
Date May 20, 2009, 7:38 a.m.
Message ID <20090520073927.823275000@de.ibm.com>
Download mbox | patch
Permalink /patch/27448/
State Accepted
Delegated to: David Miller
Headers show

Comments

frank.blaschka@de.ibm.com - May 20, 2009, 7:38 a.m.
From: Ursula Braun <ursula.braun@de.ibm.com>

Channels are already removed when setting a ctcm-device offline.
Thus ctcm_remove_device must not refer to channel information.
Solution: delete channel information from the trace call in
ctcm_remove_device.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/ctcm_main.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -urpN linux-2.6/drivers/s390/net/ctcm_main.c linux-2.6-patched/drivers/s390/net/ctcm_main.c
--- linux-2.6/drivers/s390/net/ctcm_main.c	2009-05-20 08:56:25.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/ctcm_main.c	2009-05-20 08:56:42.000000000 +0200
@@ -1677,10 +1677,8 @@  static void ctcm_remove_device(struct cc
 	BUG_ON(priv == NULL);
 
 	CTCM_DBF_TEXT_(SETUP, CTC_DBF_INFO,
-			"removing device %s, r/w = %s/%s, proto : %d",
-			priv->channel[READ]->netdev->name,
-			priv->channel[READ]->id, priv->channel[WRITE]->id,
-			priv->protocol);
+			"removing device %p, proto : %d",
+			cgdev, priv->protocol);
 
 	if (cgdev->state == CCWGROUP_ONLINE)
 		ctcm_shutdown_device(cgdev);