From: Johannes Berg <johannes@sipsolutions.net>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"Guy, Wey-Yi W" <wey-yi.w.guy@intel.com>
Subject: [PATCH] firmware_class: fix typo in error path
Date: Wed, 18 Aug 2010 17:15:18 +0200 [thread overview]
Message-ID: <1282144518.5249.2.camel@jlt3.sipsolutions.net> (raw)
From: Johannes Berg <johannes.berg@intel.com>
In the error path, _request_firmware sets
firmware_p to NULL rather than *firmware_p,
which leads to passing a freed firmware
struct to drivers when the firmware file
cannot be found. Fix this.
Broken by commit f8a4bd3456b988fc73b2c.
Reported-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/base/firmware_class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- wireless-testing.orig/drivers/base/firmware_class.c 2010-08-18 17:02:10.000000000 +0200
+++ wireless-testing/drivers/base/firmware_class.c 2010-08-18 17:13:43.000000000 +0200
@@ -568,7 +568,7 @@ static int _request_firmware(const struc
out:
if (retval) {
release_firmware(firmware);
- firmware_p = NULL;
+ *firmware_p = NULL;
}
return retval;
next reply other threads:[~2010-08-18 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 15:15 Johannes Berg [this message]
2010-08-18 15:43 ` Greg KH
2010-08-19 5:26 ` Dmitry Torokhov
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=1282144518.5249.2.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome