From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Zhu Yi <yi.zhu@intel.com>
Cc: "Chatre, Reinette" <reinette.chatre@intel.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
iwlwifi maling list <ipw3945-devel@lists.sourceforge.net>
Subject: Re: Panic in iwl3945 driver
Date: Wed, 02 Dec 2009 19:17:06 +0200 [thread overview]
Message-ID: <1259774227.26287.2.camel@maxim-laptop> (raw)
In-Reply-To: <1259732550.12157.130.camel@debian>
On Wed, 2009-12-02 at 13:42 +0800, Zhu Yi wrote:
> On Tue, 2009-12-01 at 17:28 +0800, Zhu Yi wrote:
> > On Tue, 2009-12-01 at 06:35 +0800, Maxim Levitsky wrote:
> > > 0x000000000001668e <iwl3945_rx_reply_tx+302>: lea 0x38(%r8),%rdi
> > > 0x0000000000016692 <iwl3945_rx_reply_tx+306>: lea 0x4f(%r8),%rax
> >
> > When this happened, from your previous post, r8 is 0x0 and rdi is 0x38.
> > Since "info" is %rdi (see below), this means
> > txq->txb[txq->q.read_ptr].skb[0], aka. r8 is 0.
> >
> > > rate_idx = iwl3945_hwrate_to_plcp_idx(tx_resp->rate);
> > >
> > > 0x0000000000016696 <iwl3945_rx_reply_tx+310>: movb $0x0,0x9(%rdi) <---------- RIP
> > > 0x000000000001669a <iwl3945_rx_reply_tx+314>: movb $0x0,0xc(%rdi)
> > > 0x000000000001669e <iwl3945_rx_reply_tx+318>: movb $0x0,0xf(%rdi)
> > > 0x00000000000166a2 <iwl3945_rx_reply_tx+322>: movb $0x0,0x12(%rdi)
> > > 0x00000000000166a6 <iwl3945_rx_reply_tx+326>: movb $0x0,0x15(%rdi)
> >
> > This equals to below code in ieee80211_tx_info_clear_status(). "info" is
> > %rdi, which is 0x38. That matches NULL pointer dereference at 0x41 in
> > your oops header.
> >
> > for (i = 0; i < IEEE80211_TX_MAX_RATES; i++)
> > info->status.rates[i].count = 0;
> >
> > I guess there is a race for txq->q.read_ptr somewhere. Haven't checked
> > though.
>
> OK. 3945 updated write_ptr without regard to read_ptr on the Tx path.
> This messes up our TFD on high load. The patch should fix your problem.
>
> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 994db4a..b31b34c 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -548,6 +548,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
> txq = &priv->txq[txq_id];
> q = &txq->q;
>
> + if ((iwl_queue_space(q) < q->high_mark))
> + goto drop;
> +
> spin_lock_irqsave(&priv->lock, flags);
>
> idx = get_cmd_index(q, q->write_ptr, 0);
>
>
I applied that patch, everything works.
I let you know if I see another kernel panic
(I can capture any panic on that system, I set up everything for that)
Best regards,
Maxim Levitsky
next prev parent reply other threads:[~2009-12-02 17:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 16:49 Panic in iwl3945 driver Maxim Levitsky
2009-11-27 0:00 ` Maxim Levitsky
2009-11-30 15:55 ` Maxim Levitsky
2009-11-30 21:42 ` reinette chatre
2009-11-30 22:35 ` Maxim Levitsky
2009-12-01 9:28 ` Zhu Yi
2009-12-01 18:52 ` reinette chatre
2009-12-02 2:06 ` Zhu Yi
2009-12-02 5:42 ` Zhu Yi
2009-12-02 17:17 ` Maxim Levitsky [this message]
2009-12-21 16:40 ` Maxim Levitsky
2009-12-22 8:57 ` Zhu Yi
2010-01-05 16:56 ` Maxim Levitsky
2010-01-05 22:16 ` [ipw3945-devel] " Cahill, Ben M
2010-01-05 22:26 ` Cahill, Ben M
2010-01-06 3:57 ` Zhu Yi
2010-01-06 5:23 ` Cahill, Ben M
2010-01-06 3:55 ` Zhu Yi
2009-12-02 19:18 ` [ipw3945-devel] " Cahill, Ben M
2009-12-02 19:40 ` Abhijeet Kolekar
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=1259774227.26287.2.camel@maxim-laptop \
--to=maximlevitsky@gmail.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=yi.zhu@intel.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