Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27141666 authored by Jorge Boncompte [DTI2]'s avatar Jorge Boncompte [DTI2] Committed by David S. Miller
Browse files

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().

Signed-off-by: default avatarJorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
parent a9d246db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -518,9 +518,9 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
		struct sk_buff *next = skb->next;

		skb->next = skb->prev = NULL;
		br2684_push(atmvcc, skb);
		BRPRIV(skb->dev)->stats.rx_bytes -= skb->len;
		BRPRIV(skb->dev)->stats.rx_packets--;
		br2684_push(atmvcc, skb);

		skb = next;
	}