From: Johannes Berg <johannes@sipsolutions.net>
To: Patrick Simmons <linuxrocks123@netscape.net>
Cc: David Miller <davem@davemloft.net>,
mb@bu3sch.de, linux-wireless@vger.kernel.org, dsd@gentoo.org,
kune@deine-taler.de
Subject: Re: [PATCH] Fix SPARC64 unaligned access in zd_mac_rx
Date: Sun, 02 Aug 2009 10:34:00 +0200 [thread overview]
Message-ID: <1249202040.2007.48.camel@johannes.local> (raw)
In-Reply-To: <4A754D31.7010709@netscape.net>
[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]
On Sun, 2009-08-02 at 02:24 -0600, Patrick Simmons wrote:
> It does look wrong, now that I look at it further, but I'm pretty sure
> that what was happening was that only the lower 8 bits of the
> dereferenced value were being accessed.
Yes, you're right, because buffer is a "u8 *", I initially thought that
it didn't take a pointer, but that wouldn't work, of course.
> What's odd is that it works on
> my machine, though. Whatever. Your version is clearer, in any case.
>
> What follows is hopefully the last version of this patch.
Looks good, but I think you should resubmit with
* a changed subject (e.g. "zd1211rw: fix unaligned access in zd_mac_rx")
* a standalone patch description so John doesn't have to pick it out of
your first patch etc.
Thanks!
johannes
> Signed-off-by: Patrick Simmons <linuxrocks123@netscape.net>
>
> --- a/drivers/net/wireless/zd1211rw/zd_mac.c
> +++ b/drivers/net/wireless/zd1211rw/zd_mac.c
> @@ -694,7 +694,7 @@
> && !mac->pass_ctrl)
> return 0;
>
> - fc = *(__le16 *)buffer;
> + fc = get_unaligned((__le16*)buffer);
> need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc);
>
> skb = dev_alloc_skb(length + (need_padding ? 2 : 0));
>
> --Patrick
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-08-02 8:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 7:59 [PATCH] Fix SPARC64 unaligned access in zd_mac_rx Patrick Simmons
2009-07-31 8:39 ` Johannes Berg
2009-08-01 5:23 ` David Miller
2009-08-01 10:40 ` Michael Buesch
2009-08-01 16:12 ` David Miller
2009-08-02 1:41 ` Patrick Simmons
2009-08-02 7:50 ` Johannes Berg
2009-08-02 8:24 ` Patrick Simmons
2009-08-02 8:34 ` Johannes Berg [this message]
2009-08-02 8:45 ` Patrick Simmons
2009-08-02 8:46 ` [PATCH] zd1211rw: fix " Patrick Simmons
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=1249202040.2007.48.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=dsd@gentoo.org \
--cc=kune@deine-taler.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxrocks123@netscape.net \
--cc=mb@bu3sch.de \
/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;
as well as URLs for NNTP newsgroup(s).