From: Bob Copeland <me@bobcopeland.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kernel Testers List <kernel-testers@vger.kernel.org>,
"Sergey S. Kostyliov" <rathamahata@gmail.com>,
johannes@sipsolutions.net
Subject: Re: [Bug #12490] ath5k related kernel panic in 2.6.29-rc1
Date: Mon, 6 Apr 2009 22:40:21 -0400 [thread overview]
Message-ID: <20090407024021.GA26739@hash.localnet> (raw)
In-Reply-To: <AsKNxFx2juN.A.GaD.UJn2JB@chimera>
On Mon, Apr 06, 2009 at 08:55:05PM +0200, Rafael J. Wysocki wrote:
> Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=12490
> Subject : ath5k related kernel panic in 2.6.29-rc1
> Submitter : "Sergey S. Kostyliov" <rathamahata@gmail.com>
> Date : 2009-01-12 7:38 (85 days old)
> References : http://marc.info/?l=linux-kernel&m=123174591509586&w=4
> Handled-By : Bob Copeland <me@bobcopeland.com>
I must admit I still don't have an idea of the root cause on this
one. It still looks like some kind of memory corruption to me,
but no smoking gun so far. The one patch in 2.6.30 that might have
fixed it in the driver didn't help.
Anyway here's a patch to buy some time. Johannes, would this be
an acceptable band-aid for now?
Sergey, can you test this patch? It doesn't fix anything but hopefully
makes your system survive the bug. I gave it a quick test by forcing
one of the rate indexes to a bad value.
From: Bob Copeland <me@bobcopeland.com>
Date: Mon, 6 Apr 2009 22:04:09 -0400
Subject: [PATCH] mac80211: be more resilient in the face of bad rate indexes
If for whatever reason the rate tables contain invalid rates,
ieee80211_get_tx_rate will warn and return NULL, causing some
drivers to crash. Those that don't will subsequently hit a
BUG_ON() in rate.c. Instead, return a valid rate structure from
ieee80211_get_tx_rate() and only WARN() in rate_control_get_rate().
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
include/net/mac80211.h | 12 +++++++++---
net/mac80211/rate.c | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 3b83a80..4a74f40 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1014,13 +1014,19 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr)
memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN);
}
+static inline s8
+rate_lowest_index(struct ieee80211_supported_band *sband,
+ struct ieee80211_sta *sta);
+
static inline struct ieee80211_rate *
ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
const struct ieee80211_tx_info *c)
{
- if (WARN_ON(c->control.rates[0].idx < 0))
- return NULL;
- return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
+ s8 idx = c->control.rates[0].idx;
+ if (WARN_ON(idx < 0))
+ idx = rate_lowest_index(hw->wiphy->bands[c->band],
+ c->control.sta);
+ return &hw->wiphy->bands[c->band]->bitrates[idx];
}
static inline struct ieee80211_rate *
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 4641f00..d8a5d46 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -238,7 +238,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
sdata->max_ratectrl_rateidx);
}
- BUG_ON(info->control.rates[0].idx < 0);
+ WARN_ON(info->control.rates[0].idx < 0);
}
struct rate_control_ref *rate_control_get(struct rate_control_ref *ref)
--
1.6.0.6
--
Bob Copeland %% www.bobcopeland.com
next prev parent reply other threads:[~2009-04-07 2:40 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 18:54 2.6.29-git13: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-04-06 19:03 ` [Bug #12499] Problem with using bluetooth adaper connected to usb port Rafael J. Wysocki
2009-04-07 7:14 ` Marcel Holtmann
2009-04-07 7:49 ` Maciej Rutecki
[not found] ` <8db1092f0904070049o675de150qd319fc5853ec9bd8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-08 9:27 ` Maciej Rutecki
2009-04-07 21:13 ` Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12667] Badness at kernel/time/timekeeping.c:98 in pmud (timekeeping_suspended) Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12681] s2ram: fails to wake up on Acer Extensa 4220 (SMP disabled) Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12668] USB flash disk surprise disconnect Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12671] uvc_status_cleanup(): undefined reference to `input_unregister_device' Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12670] BUG: unable to handle kernel paging request at pin_to_kill+0x21 Rafael J. Wysocki
2009-04-07 8:11 ` Alessandro Bono
2009-04-07 21:14 ` Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12771] Oops in i915_gem_flush Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12705] X200: Brightness broken since 2.6.29-rc4-58-g4c098bc Rafael J. Wysocki
2009-04-07 4:12 ` Len Brown
[not found] ` <alpine.LFD.2.00.0904070011280.5698-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-07 21:16 ` Rafael J. Wysocki
[not found] ` <20090417143532.GA6195@ikn.schottelius.org>
[not found] ` <20090417143532.GA6195-9ll+q7fL1vOwdVNcq5OhcUB+6BGkLq7r@public.gmane.org>
2009-04-20 10:36 ` Nico Schottelius
2009-04-06 19:05 ` [Bug #12778] suspend regression from 29rc5 to 29rc6 Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12809] iozone regression with 2.6.29-rc6 Rafael J. Wysocki
2009-04-06 22:05 ` Linus Torvalds
2009-04-06 22:15 ` Wu Fengguang
2009-04-06 22:20 ` Wu Fengguang
2009-04-06 22:30 ` Rafael J. Wysocki
[not found] ` <200904070030.26367.rjw-KKrjLPT3xs0@public.gmane.org>
2009-04-06 23:34 ` [stable] " Chris Wright
2009-04-06 19:05 ` [Bug #12836] 2.6.29-rc breaks STD using Intel 945 Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12867] 2.6.29-rc7 broke r8169 MAC on Thecus n2100 ARM board Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12861] Xorg fails to start "Failed to allocate space for kernel memory manager" Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12871] usb bluetooth crashes system Rafael J. Wysocki
2009-04-07 7:16 ` Marcel Holtmann
2009-04-07 21:09 ` Pavel Machek
[not found] ` <20090407210946.GK3278-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-04-07 7:27 ` Pavel Machek
2009-04-06 19:05 ` [Bug #12872] pwc mmap always fails with EAGAIN Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12899] Crash in i915.ko: i915_driver_irq_handler Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12908] acpi_ex_extract_from_field -- div by zero Rafael J. Wysocki
2009-04-07 4:09 ` Len Brown
[not found] ` <alpine.LFD.2.00.0904070008140.5698-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-07 11:03 ` Jiri Slaby
2009-04-06 19:05 ` [Bug #12971] "tg3 transmit timed out" when transmitting at high bitrate Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12909] boot/kernel init duration regression from 2.6.28 Rafael J. Wysocki
2009-04-06 22:47 ` CaT
2011-06-25 23:59 ` boot/kernel init duration regression in 2.6.39 (was: Re: [Bug #12909] boot/kernel init duration regression from 2.6.28) CaT
2009-04-06 19:05 ` [Bug #12947] r128: system hangs when X is started with DRI enabled Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12961] Kernel panics in early boot: IO-APIC + timer doesn't work Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #13001] PCI-DMA: Out of IOMMU space Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12980] lockup in X.org Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12975] ata2: lots of error messages, but OS still running well Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #13016] consistent oops from request_key in 2.6.29 Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #13015] pppoe over ethernet Rafael J. Wysocki
2009-04-07 3:31 ` Cyrill Gorcunov
[not found] ` <aa79d98a0904062031x321bd160rd89b19a6a49fe760-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-07 8:33 ` Detlef Tschirschky
[not found] ` <alpine.LNX.2.00.0904071020380.7197-PUsz0/4jNWon//yrT8JD5w@public.gmane.org>
2009-04-07 8:41 ` Cyrill Gorcunov
[not found] ` <aa79d98a0904070141r45d752dana00cebb381b72c4c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-07 21:23 ` Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #13017] ATA bus errors on resume Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #13026] cs5536 is broken Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #13019] /proc/<pid>/maps offset output broken in 2.6.29 Rafael J. Wysocki
2009-04-06 23:13 ` Hugh Dickins
[not found] ` <Pine.LNX.4.64.0904070008320.4254-XZxpfvf5U/bbmfIwyoSfiQ@public.gmane.org>
2009-04-07 21:22 ` Rafael J. Wysocki
2009-04-06 21:53 ` 2.6.29-git13: Reported regressions from 2.6.28 Linus Torvalds
2009-04-06 22:34 ` Rafael J. Wysocki
[not found] ` <200904070035.00784.rjw-KKrjLPT3xs0@public.gmane.org>
2009-04-16 21:08 ` Chris Friesen
2009-04-16 21:35 ` Linus Torvalds
[not found] ` <alpine.LFD.2.00.0904161432000.4042-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-20 21:22 ` Chris Friesen
[not found] ` <49ECE783.5050704-ZIRUuHA3oDzQT0dZR+AlfA@public.gmane.org>
2009-04-20 23:08 ` Hugh Dickins
[not found] ` <Pine.LNX.4.64.0904202352520.2924-XZxpfvf5U/bbmfIwyoSfiQ@public.gmane.org>
2009-04-22 19:32 ` Chris Friesen
2009-04-07 3:56 ` Trenton D. Adams
2009-04-07 4:07 ` Linus Torvalds
2009-04-07 4:23 ` Trenton D. Adams
2009-04-07 6:24 ` Jarek Poplawski
2009-04-07 6:31 ` Trenton D. Adams
2009-04-07 6:41 ` Jarek Poplawski
[not found] ` <20090407064102.GB4195-8HppEYmqbBCE+EvaaNYduQ@public.gmane.org>
2009-04-07 6:53 ` Trenton D. Adams
[not found] ` <alpine.LFD.2.00.0904061443000.7443-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-07 16:16 ` Stefan Richter
[not found] ` <49DB7C77.1000702-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org>
2009-04-07 16:44 ` Trenton D. Adams
2009-04-07 17:10 ` 2.6.29 on MacBook 2, 1 fails to reboot (was Re: 2.6.29-git13: Reported regressions from 2.6.28) Stefan Richter
[not found] ` <49DB8909.3000905-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org>
2009-04-07 17:20 ` 2.6.29 on MacBook 2,1 " Justin Mattock
2009-04-07 18:22 ` Trenton D. Adams
[not found] ` <9b1675090904071122k6a53295fwfffc336011edee8e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-07 19:23 ` Stefan Richter
[not found] ` <49DBA821.1070408-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org>
2009-04-07 20:52 ` Trenton D. Adams
2009-04-08 1:16 ` Trenton D. Adams
2009-04-08 8:00 ` Rafael J. Wysocki
[not found] ` <AsKNxFx2juN.A.cV.bGn2JB@chimera>
2009-04-06 23:03 ` [Bug #12870] 2.6.29-rc "TKIP: replay detected" regression Hugh Dickins
[not found] ` <Pine.LNX.4.64.0904070001400.4254-XZxpfvf5U/bbmfIwyoSfiQ@public.gmane.org>
2009-04-07 21:28 ` Rafael J. Wysocki
[not found] ` <AsKNxFx2juN.A.0OH.0Fn2JB@chimera>
2009-04-07 2:13 ` [Bug #13018] 2.6.29 on MacBook 2,1 fails to reboot Trenton D. Adams
[not found] ` <9b1675090904061913o614e02fdl22ef2cf795525a6d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-07 2:14 ` Trenton D. Adams
[not found] ` <9b1675090904061914m4d5e204lbf726a07ba406cf2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-07 21:30 ` Rafael J. Wysocki
[not found] ` <200904072330.59738.rjw-KKrjLPT3xs0@public.gmane.org>
2009-04-07 22:00 ` Trenton D. Adams
[not found] ` <AsKNxFx2juN.A.GaD.UJn2JB@chimera>
2009-04-07 2:40 ` Bob Copeland [this message]
2009-04-07 10:03 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Johannes Berg
[not found] ` <1239098625.22453.6.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-04-08 0:46 ` Bob Copeland
[not found] ` <20090408004644.GB28096-dciA93evfQsotQDIqMXfEQ@public.gmane.org>
2009-04-08 0:54 ` Johannes Berg
2009-04-07 10:02 ` 2.6.29-git13: Reported regressions from 2.6.28 Ilpo Järvinen
2009-04-07 22:24 ` Rafael J. Wysocki
2009-04-17 16:23 ` Rolf Eike Beer
-- strict thread matches above, loose matches on Subject: below --
2009-06-07 10:02 2.6.30-rc8-git4: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-06-07 10:03 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-05-30 19:50 2.6.30-rc7-git4: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-30 19:50 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-05-24 19:27 2.6.30-rc7: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-24 19:27 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-05-16 19:58 2.6.30-rc6: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-16 19:59 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-04-26 9:42 2.6.30-rc3-git1: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-04-26 9:42 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-03-21 16:28 2.6.29-rc8-git5: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-21 16:39 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-03-14 19:01 2.6.29-rc8: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-14 19:05 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-03-03 19:22 2.6.29-rc6-git7: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-03 19:25 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-23 21:45 2.6.29-rc6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-23 21:48 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-24 13:25 ` Bob Copeland
[not found] ` <20090224132554.GA6019-dciA93evfQsotQDIqMXfEQ@public.gmane.org>
2009-02-25 22:55 ` Rafael J. Wysocki
2009-02-14 20:35 2.6.29-rc5: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-14 20:38 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-08 19:05 2.6.29-rc4: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-04 10:21 2.6.29-rc3-git6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-06 18:48 ` Bob Copeland
[not found] ` <20090206184156.M22909-aXfl/3sk2vNUbtYUoyoikg@public.gmane.org>
2009-02-06 23:55 ` Rafael J. Wysocki
2009-01-19 21:28 2.6.29-rc2-git1: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-01-20 22:44 ` Bob Copeland
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=20090407024021.GA26739@hash.localnet \
--to=me@bobcopeland.com \
--cc=johannes@sipsolutions.net \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rathamahata@gmail.com \
--cc=rjw@sisk.pl \
/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