From: Greg KH <gregkh@suse.de>
To: Borislav Petkov <bp@alien8.de>
Cc: "Lucas C. Villa Real" <lucasvr@gmail.com>,
linux-kernel@vger.kernel.org,
Wey-Yi Guya <wey-yi.w.guy@intel.com>,
Johannes Berg <johannes.berg@intel.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH] Initialize pointer on request_firmware
Date: Thu, 22 Sep 2011 11:03:27 -0700 [thread overview]
Message-ID: <20110922180327.GA1932@suse.de> (raw)
In-Reply-To: <20110922175406.GA4709@gere.osrc.amd.com>
On Thu, Sep 22, 2011 at 07:54:06PM +0200, Borislav Petkov wrote:
> On Thu, Sep 22, 2011 at 10:18:29AM -0700, Greg KH wrote:
> > On Thu, Sep 22, 2011 at 11:23:47AM +0200, Borislav Petkov wrote:
> > > On Wed, Sep 21, 2011 at 11:55:15PM -0300, Lucas C. Villa Real wrote:
> > > > Hello, folks,
> > > >
> > > > I've seen some kernel oopses when suspending my machine. The problem comes from isight_firmware, which assumes that, on error, a call to request_firmware() will initialize the provided pointer to the firmware image to NULL.
> > > >
> > > > The patch below fixes the isight_firmware side of the problem and also ensures that request_firmware() always sets the pointer to NULL on such cases (it currently does that for all except one situation).
> > > >
> > > > Signed-off-by: Lucas C. Villa Real <lucasvr@gobolinux.org>
> > > >
> > > > --- linux-3.0.4/drivers/base/firmware_class.c.orig 2011-09-21 21:03:01.000000000 -0300
> > > > +++ linux-3.0.4/drivers/base/firmware_class.c 2011-09-21 21:03:13.000000000 -0300
> > > > @@ -523,6 +523,7 @@ static int _request_firmware(const struc
> > > >
> > > > if (WARN_ON(usermodehelper_is_disabled())) {
> > > > dev_err(device, "firmware: %s will not be loaded\n", name);
> > > > + *firmware_p = NULL;
> > > > return -EBUSY;
> > > > }
> > >
> > > Looks like f45f3c1f3f616 needs backporting to stable, if it hasn't
> > > happened yet.
> >
> > What stable tree? That patch was in the 2.6.36 release, so 3.0-stable
> > doesn't need it, right?
>
> Judging by the diff lines above, 3.0.4 doesn't seem to have it. Wait,
> lemme check... uh no, I can't, the damn k.org thing is still down :-(.
The patch was in the 2.6.36 kernel, so by nature of that, 3.0 will also
have it, right?
> > > Oh, and then there's caca9510ff4e5 too which adds this
> > > exit path to the goto out label as the rest of the function.
> >
> > But that was only due to other problems.
>
> That second one adds the goto thing to the "out:" label where the
> firmware_p gets NULLed. IOW, it prepares the code for f45f3c1f3f616.
>
> Does that make more sense now?
Nope, sorry, still confused :)
How about, what patches are needed for the 3.0-stable kernel tree in
order to resolve these issue? Git commit ids please.
thanks,
greg k-h
next prev parent reply other threads:[~2011-09-22 18:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 2:55 [PATCH] Initialize pointer on request_firmware Lucas C. Villa Real
2011-09-22 9:23 ` Borislav Petkov
2011-09-22 17:18 ` Greg KH
2011-09-22 17:54 ` Borislav Petkov
2011-09-22 18:03 ` Greg KH [this message]
2011-09-22 18:20 ` Borislav Petkov
2011-09-22 19:05 ` Lucas C. Villa Real
2011-09-23 15:51 ` Lucas C. Villa Real
2011-09-27 20:13 ` Borislav Petkov
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=20110922180327.GA1932@suse.de \
--to=gregkh@suse.de \
--cc=bp@alien8.de \
--cc=dmitry.torokhov@gmail.com \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucasvr@gmail.com \
--cc=penberg@kernel.org \
--cc=wey-yi.w.guy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.