* [PATCH] firmware_class: fix typo in error path
@ 2010-08-18 15:15 Johannes Berg
2010-08-18 15:43 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2010-08-18 15:15 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Dmitry Torokhov, LKML, Guy, Wey-Yi W
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;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] firmware_class: fix typo in error path
2010-08-18 15:15 [PATCH] firmware_class: fix typo in error path Johannes Berg
@ 2010-08-18 15:43 ` Greg KH
2010-08-19 5:26 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2010-08-18 15:43 UTC (permalink / raw)
To: Johannes Berg; +Cc: Greg Kroah-Hartman, Dmitry Torokhov, LKML, Guy, Wey-Yi W
On Wed, Aug 18, 2010 at 05:15:18PM +0200, Johannes Berg wrote:
> 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.
Nice catch, thanks. I'll queue it up.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware_class: fix typo in error path
2010-08-18 15:43 ` Greg KH
@ 2010-08-19 5:26 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2010-08-19 5:26 UTC (permalink / raw)
To: Greg KH; +Cc: Johannes Berg, Greg Kroah-Hartman, LKML, Guy, Wey-Yi W
On Wed, Aug 18, 2010 at 08:43:30AM -0700, Greg KH wrote:
> On Wed, Aug 18, 2010 at 05:15:18PM +0200, Johannes Berg wrote:
> > 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.
>
> Nice catch, thanks. I'll queue it up.
>
Yep, looks good, thank you for fixing this,
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-19 5:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 15:15 [PATCH] firmware_class: fix typo in error path Johannes Berg
2010-08-18 15:43 ` Greg KH
2010-08-19 5:26 ` Dmitry Torokhov
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.