From: Guenter Roeck <linux@roeck-us.net>
To: Ming Lei <ming.lei@canonical.com>
Cc: nirinA raseliarison <nirina.raseliarison@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Francois Romieu <romieu@fr.zoreil.com>,
nic_swsd@realtek.com, Hayes Wang <hayeswang@realtek.com>
Subject: Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
Date: Fri, 14 Jun 2013 23:30:56 -0700 [thread overview]
Message-ID: <20130615063055.GA13766@roeck-us.net> (raw)
In-Reply-To: <CACVXFVP5-d_1RUC+vBTLxnHZje3F1rYaJvDCgbV2-ngXfb_KNw@mail.gmail.com>
On Sat, Jun 15, 2013 at 10:32:14AM +0800, Ming Lei wrote:
> On Sat, Jun 15, 2013 at 1:07 AM, nirinA raseliarison
> <nirina.raseliarison@gmail.com> wrote:
>
> > patch applied and no longer have the bug message when i
> > reboot and wake up the ethernet controller.
>
> I am wondering if Guenter's patch can fix the race really, but I'd like to
> see Guenter's explanation on his patch.
>
> The race should be caused by below:
>
> - request timeout triggered by internal timer
>
> - user space aborts the requests before the line in _request_firmware_load()
>
> fw_priv->buf = NULL
>
> which is run in timeout path
>
> - then the abort() called from firmware_loading_store() may use a freed fw buf
> since the timeout path will free the fw buffer.
>
> Considered clearing 'fw_priv->buf' in _request_firmware_load()() isn't protected
> by fw_lock now, so Guenter's patch can't avoid the race entirely.
>
I agree; my patch only protects one specific path, and was based on the
observation that access to fw_priv->buf is protected elsewhwere in the code.
My suspicion was that fw_priv->buf was freed while waiting for the mutex in
firmware_loading_store().
Your patch is more comprehensive.
Guenter
next prev parent reply other threads:[~2013-06-15 6:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 12:49 nirinA raseliarison
2013-06-14 14:30 ` Bjorn Helgaas
2013-06-14 15:45 ` Guenter Roeck
2013-06-14 17:07 ` nirinA raseliarison
2013-06-15 2:32 ` Ming Lei
2013-06-15 6:30 ` Guenter Roeck [this message]
2013-06-15 8:08 ` Ming Lei
2013-06-15 16:43 ` nirinA raseliarison
2013-06-14 17:02 ` Ming Lei
2013-06-14 18:32 ` nirinA raseliarison
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=20130615063055.GA13766@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hayeswang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=nic_swsd@realtek.com \
--cc=nirina.raseliarison@gmail.com \
--cc=romieu@fr.zoreil.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
all inboxes | Powered by JetHome®