Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1607118
| From | Robert Perry Hooker <perry.hooker@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: wilc1000: use kernel define byte order macros |
| Date | 2017-03-23 03:00 +0100 |
| Message-ID | <to0cF-3tk-9@gated-at.bofh.it> (permalink) |
| References | <tnygq-8eX-23@gated-at.bofh.it> <tnyq5-8is-11@gated-at.bofh.it> <tnzPb-Jo-9@gated-at.bofh.it> <tnKKC-aT-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
I don't think buff is an ieee80211_hdr struct. I think it's the rx_buffer allocated at wilc_wlan.c:1417. Regards, Perry On Wed, 2017-03-22 at 12:24 +0300, Dan Carpenter wrote: > On Tue, Mar 21, 2017 at 03:40:10PM -0600, Robert Perry Hooker wrote: > > Thanks for taking a look, Dan. Sorry if I missed the mark here. > > > > Can you tell me a bit more about the bug this would introduce? > > > > I see that ieee80211_is_action is defined like this: static inline bool ieee80211_is_action(__le16 fc) > > > > ...and that buff[FRAME_TYPE_ID]is a u8 (since FRAME_TYPE_ID = 0). > > > > Is there an issue with calling cpu_to_le16 on a u8 that isn't encountered by implicitly casting a u8 to __le16? Or > > am I > > missing something else? > > > > Oh... Hm. You're right. I just was thinking that since buff was a > little endian buffer but it's only reading a u8. It should probably > be reading a le16... The buff likely is just a regular ieee80211_hdr > struct. > > So you're fixing a bug, but probably not in the right way. We should > instead just say "struct ieee80211_hdr *hdr = buff;" and instead of > treating it like an array of u8. Probably it requires testing... > > regards, > dan carpenter >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: wilc1000: use kernel define byte order macros Perry Hooker <perry.hooker@gmail.com> - 2017-03-21 21:10 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-21 21:20 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Robert Perry Hooker <perry.hooker@gmail.com> - 2017-03-21 22:50 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-22 10:30 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Robert Perry Hooker <perry.hooker@gmail.com> - 2017-03-23 03:00 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-23 09:40 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Robert Perry Hooker <perry.hooker@gmail.com> - 2017-03-23 23:20 +0100
Re: [PATCH] staging: wilc1000: use kernel define byte order macros Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-24 10:00 +0100
csiph-web