Skip to contentSkip to conversation

can: sja1000: fix bug using library functions for skb allocation

PATCH Applied Wolfgang Grandegger 2 participants 2 messages Oct 26, 2009 – Oct 27, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: sja1000: fix bug using library functions for skb allocation

Commit 7b6856a0 "can: provide library functions for skb allocation" did not properly remove two lines of the SJA1000 driver resulting in a 'skb_over_panic' when calling skb_put, as reported by Kurt.

---
 drivers/net/can/sja1000/sja1000.c |    2 --
 1 file changed, 2 deletions(-)
drivers/net/can/sja1000/sja1000.c +0 -2
Index: net-next-2.6/drivers/net/can/sja1000/sja1000.c
===================================================================
@@ -321,8 +321,6 @@ static void sja1000_rx(struct net_device
 	if (fi & FI_RTR)
 		id |= CAN_RTR_FLAG;
 
-	cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
-	memset(cf, 0, sizeof(struct can_frame));
 	cf->can_id = id;
 	cf->can_dlc = dlc;
 	for (i = 0; i < dlc; i++)