Skip to content

Commit

Permalink
atm: [br2684] Fix oops due to skb->dev being NULL
Browse files Browse the repository at this point in the history
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: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
  • Loading branch information
Jorge Boncompte [DTI2] authored and David S. Miller committed Jun 17, 2008
1 parent a9d246d commit 2714166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2714166

Please sign in to comment.