Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atm: br2684: Fix oops due to skb->dev being NULL

This oops have been already fixed with commit

27141666b69f535a4d63d7bc6d9e84ee5032f82a

atm: [br2684] Fix oops due to skb->dev being NULL

It happens that if a packet arrives in a VC between the call to open it on
the hardware and the call to change the backend to br2684, br2684_regvcc
processes the packet and oopses dereferencing skb->dev because it is
NULL before the call to br2684_push().

but have been introduced again with commit

b6211ae7f2e56837c6a4849316396d1535606e90

atm: Use SKB queue and list helpers instead of doing it by-hand.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Daniel Schwierzeck and committed by
David S. Miller
fbe5e29e 98e77438

+4 -3
+4 -3
net/atm/br2684.c
··· 558 558 spin_unlock_irqrestore(&rq->lock, flags); 559 559 560 560 skb_queue_walk_safe(&queue, skb, tmp) { 561 - struct net_device *dev = skb->dev; 561 + struct net_device *dev; 562 + 563 + br2684_push(atmvcc, skb); 564 + dev = skb->dev; 562 565 563 566 dev->stats.rx_bytes -= skb->len; 564 567 dev->stats.rx_packets--; 565 - 566 - br2684_push(atmvcc, skb); 567 568 } 568 569 569 570 /* initialize netdev carrier state */