[OpenWrt-Devel] [PATCH] b53 kernel memory corruption fix

blmink blmink at mink.su
Tue Jun 9 05:57:04 EDT 2015


Hi,

this patch fixes kernel memory corruption in b53 driver during device 
global reset, which causes kernel panic especially on 64bit platforms.

Signed-off-by: Fedor Konstantinov <blmink at mink.su>
---
Index: target/linux/generic/files/drivers/net/phy/b53/b53_common.c
===================================================================
--- target/linux/generic/files/drivers/net/phy/b53/b53_common.c 
(revision 45932)
+++ target/linux/generic/files/drivers/net/phy/b53/b53_common.c	(working 
copy)
@@ -803,8 +803,8 @@
  	priv->enable_jumbo = 0;
  	priv->allow_vid_4095 = 0;

-	memset(priv->vlans, 0, sizeof(priv->vlans) * dev->vlans);
-	memset(priv->ports, 0, sizeof(priv->ports) * dev->ports);
+	memset(priv->vlans, 0, sizeof(struct b53_vlan) * dev->vlans);
+	memset(priv->ports, 0, sizeof(struct b53_port) * dev->ports);

  	return b53_switch_reset(priv);
  }
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list