From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
To: netdev@vger.kernel.org
Cc: chas williams <chas@cmf.nrl.navy.mil>
Subject: [PATCH][ATM] br2684: Fix oops due to skb->dev being NULL
Date: Thu, 05 Jun 2008 17:43:50 +0200 [thread overview]
Message-ID: <484809B6.2080904@dti2.net> (raw)
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>
---
net/atm/br2684.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 9d52ebf..ac60350 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -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;
}
--
next reply other threads:[~2008-06-05 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 15:43 Jorge Boncompte [DTI2] [this message]
2008-06-14 21:21 ` [PATCH][ATM] br2684: Fix oops due to skb->dev being NULL Chas Williams (CONTRACTOR)
-- strict thread matches above, loose matches on Subject: below --
2011-08-19 22:04 [PATCH] atm: " Daniel Schwierzeck
2011-08-20 21:13 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484809B6.2080904@dti2.net \
--to=jorge@dti2.net \
--cc=chas@cmf.nrl.navy.mil \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.