linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@web.de>
To: linux-wireless@vger.kernel.org
Cc: John W Linville <linville@tuxdriver.com>
Subject: [PATCH] p54: fix oops caused by bad eeproms
Date: Thu, 4 Dec 2008 14:29:16 +0100	[thread overview]
Message-ID: <200812041429.16869.chunkeey@web.de> (raw)

This patch fixes a bug that could occur, if it the eeprom is incomplete or partly corrupted.

e.g:
BUG: unable to handle kernel NULL pointer dereference at 00000008
IP: p54_assign_address+0x108/0x15d [p54common]
Oops: 0002 [#1] SMP
Pid: 12988, comm: phy1 Tainted: P        W  2.6.28-rc6-wl #3
RIP: 0010: p54_assign_address+0x108/0x15d [p54common]
 [...]
Call Trace:
 p54_alloc_skb+0xa3/0xc0 [p54common]
 p54_scan+0x37/0x204 [p54common]
 [...]

Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 719bdab..234fee3 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -1490,7 +1490,7 @@ static int p54_scan(struct ieee80211_hw *dev, u16 mode, u16 dwell,
 
  err:
 	printk(KERN_ERR "%s: frequency change failed\n", wiphy_name(dev->wiphy));
-	kfree_skb(skb);
+	p54_free_skb(dev, skb);
 	return -EINVAL;
 }
 

                 reply	other threads:[~2008-12-04 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200812041429.16869.chunkeey@web.de \
    --to=chunkeey@web.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).