From: David Miller <davem@davemloft.net>
To: dave@thedillows.org
Cc: ben@decadent.org.uk, netdev@vger.kernel.org
Subject: Re: [PATCH v2] typhoon: Use request_firmware()
Date: Mon, 02 Mar 2009 01:53:15 -0800 (PST) [thread overview]
Message-ID: <20090302.015315.181629191.davem@davemloft.net> (raw)
In-Reply-To: <1235980579.23967.2.camel@localhost.localdomain>
From: David Dillow <dave@thedillows.org>
Date: Mon, 02 Mar 2009 02:56:19 -0500
> On Sun, 2009-03-01 at 20:29 -0800, David Miller wrote:
> > +
> > + typhoon_fw_image = kmalloc(typhoon_fw->size, GFP_KERNEL);
> > + if (!typhoon_fw_image) {
> > + err = -ENOMEM;
> > + goto out_err;
> > }
>
> You never copied the image into the kmalloc'd memory, so you upload
> garbage.
>
> Fix that and I think it will be OK.
Good catch, I've checked in the following fix:
typhoon: Add missing firmware copy.
Noticed by David Dillow.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/typhoon.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index ec2541c..9bba787 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1377,6 +1377,7 @@ typhoon_request_firmware(struct typhoon *tp)
err = -ENOMEM;
goto out_err;
}
+ memcpy(typhoon_fw_image, typhoon_fw->data, typhoon_fw->size);
return 0;
--
1.6.1.2.253.ga34a
next prev parent reply other threads:[~2009-03-02 9:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1235324217.2832.49.camel@hashbaz.i.decadent.org.uk>
2009-02-26 13:49 ` [PATCH v2] typhoon: Use request_firmware() Ben Hutchings
2009-02-27 7:21 ` David Miller
2009-03-01 20:38 ` David Dillow
2009-03-02 1:02 ` Ben Hutchings
2009-03-02 1:44 ` David Miller
2009-03-02 3:16 ` David Dillow
2009-03-02 4:11 ` David Miller
2009-03-02 4:29 ` David Miller
2009-03-02 7:56 ` David Dillow
2009-03-02 9:53 ` David Miller [this message]
2009-03-03 5:44 ` David Dillow
2009-03-03 5:49 ` [PATCH v3 checked] " David Dillow
2009-03-03 6:15 ` David Miller
[not found] ` <1235622381.8683.38.camel@hashbaz.i.decadent.org.uk>
2009-02-27 7:21 ` [PATCH v2] " David Miller
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=20090302.015315.181629191.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ben@decadent.org.uk \
--cc=dave@thedillows.org \
--cc=netdev@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 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.