linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Golden <goldenstranger@yahoo.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: firmware_loading_store: vmap() failed, broken firmware with kernles .27 - .30
Date: Tue, 30 Mar 2010 23:15:52 -0400	[thread overview]
Message-ID: <1270005352.27938.14.camel@mj> (raw)
In-Reply-To: <733969.9491.qm@web56807.mail.re3.yahoo.com>

On Thu, 2010-03-25 at 09:20 -0700, Golden wrote:

> Recent compat-wireless releases break firmware loading under slightly
> older kernels. The bug occurs as tested by me with 2.6.27 and 2.6.30,
> it does not appear on kernels 2.6.31 and up.
...
> b43 ssb0:0: firmware: requesting b43-open/ucode5.fw
> compat_firmware ssb0:0: firmware_loading_store: unexpected value (0)

I was able to reproduce "unexpected value" with Linux 2.6.28.10 and
ar9170usb.

After adding some debug printk's, I get this:

firmware_loading_store: loading = 1
firmware_loading_store: loading = 1
firmware_loading_store: loading = 0
fw_priv->fw->data = ffffc2001027a000
firmware_loading_store: loading = 0
compat_firmware 1-7: firmware_loading_store: unexpected value (0)
firmware_loading_store: abort
usb 1-7: ar9170.fw firmware file not found, trying old firmware...

It looks like we have a race condition here.  Two processes try to load
the firmware.

I remember vaguely that it was discussed before.  Google search for
"firmware_loading_store race" finds some interesting links, but I cannot
find a fix.  Likewise, search for "firmware_loading_store: unexpected
value" finds a lot of stuff in the Linux 2.6.13 timeframe.

It looks like a race condition.  Adding dump_stack() to the beginning of
firmware_loading_store() makes the problem disappear.

-- 
Regards,
Pavel Roskin

  parent reply	other threads:[~2010-03-31  3:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 16:20 firmware_loading_store: vmap() failed, broken firmware with kernles .27 - .30 Golden
2010-03-27 12:22 ` Golden
2010-03-31  3:15 ` Pavel Roskin [this message]
2010-03-31 21:56   ` Golden
2010-04-02  1:53     ` Pavel Roskin
  -- strict thread matches above, loose matches on Subject: below --
2010-04-02  6:42 Golden

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=1270005352.27938.14.camel@mj \
    --to=proski@gnu.org \
    --cc=goldenstranger@yahoo.com \
    --cc=linux-wireless@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 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).