* [PATCH] Fix crash on big-endian systems during scan
@ 2006-04-14 21:59 Pavel Roskin
2006-04-17 1:06 ` Jouni Malinen
0 siblings, 1 reply; 9+ messages in thread
From: Pavel Roskin @ 2006-04-14 21:59 UTC (permalink / raw)
To: netdev; +Cc: hostap
From: Pavel Roskin <proski@gnu.org>
The original code was doing arithmetics on a little-endian value.
Reported by Stelios Koroneos <stelios@stelioscellar.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
drivers/net/wireless/hostap/hostap_ioctl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 8b37e82..8399de5 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1860,7 +1860,7 @@ static char * __prism2_translate_scan(lo
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWFREQ;
if (scan) {
- chan = scan->chid;
+ chan = le16_to_cpu(scan->chid);
} else if (bss) {
chan = bss->chan;
} else {
@@ -1868,7 +1868,7 @@ static char * __prism2_translate_scan(lo
}
if (chan > 0) {
- iwe.u.freq.m = freq_list[le16_to_cpu(chan - 1)] * 100000;
+ iwe.u.freq.m = freq_list[chan - 1] * 100000;
iwe.u.freq.e = 1;
current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
IW_EV_FREQ_LEN);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-14 21:59 [PATCH] Fix crash on big-endian systems during scan Pavel Roskin
@ 2006-04-17 1:06 ` Jouni Malinen
2006-04-17 13:21 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Jouni Malinen @ 2006-04-17 1:06 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, hostap, Pavel Roskin
On Fri, Apr 14, 2006 at 05:59:11PM -0400, Pavel Roskin wrote:
> The original code was doing arithmetics on a little-endian value.
John, please apply this to wireless-2.6 tree. This code is triggered at
least for the case where WPA is not used. I had noticed it before, but I
think I've only tested WPA/WPA2 on big endian systems..
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 1:06 ` Jouni Malinen
@ 2006-04-17 13:21 ` John W. Linville
2006-04-17 14:34 ` Dan Williams
0 siblings, 1 reply; 9+ messages in thread
From: John W. Linville @ 2006-04-17 13:21 UTC (permalink / raw)
To: netdev, hostap, Pavel Roskin
On Sun, Apr 16, 2006 at 06:06:02PM -0700, Jouni Malinen wrote:
> On Fri, Apr 14, 2006 at 05:59:11PM -0400, Pavel Roskin wrote:
>
> > The original code was doing arithmetics on a little-endian value.
>
> John, please apply this to wireless-2.6 tree. This code is triggered at
> least for the case where WPA is not used. I had noticed it before, but I
> think I've only tested WPA/WPA2 on big endian systems..
Can someone repost this patch? I seem to have missed it.
Thanks,
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 13:21 ` John W. Linville
@ 2006-04-17 14:34 ` Dan Williams
2006-04-17 14:45 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Dan Williams @ 2006-04-17 14:34 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, hostap, Pavel Roskin
On Mon, 2006-04-17 at 09:21 -0400, John W. Linville wrote:
> On Sun, Apr 16, 2006 at 06:06:02PM -0700, Jouni Malinen wrote:
> > On Fri, Apr 14, 2006 at 05:59:11PM -0400, Pavel Roskin wrote:
> >
> > > The original code was doing arithmetics on a little-endian value.
> >
> > John, please apply this to wireless-2.6 tree. This code is triggered at
> > least for the case where WPA is not used. I had noticed it before, but I
> > think I've only tested WPA/WPA2 on big endian systems..
>
> Can someone repost this patch? I seem to have missed it.
Pavel posted to netdev originally on Friday April 14th with the patch
included in the email, with the title "[PATCH] Fix crash on big-endian
systems during scan"...
http://www.spinics.net/lists/netdev/msg03023.html
Sure you don't have it somewhere? If not, I'm sure somebody can
resend...
Dan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 14:34 ` Dan Williams
@ 2006-04-17 14:45 ` John W. Linville
2006-04-17 15:01 ` Dan Williams
0 siblings, 1 reply; 9+ messages in thread
From: John W. Linville @ 2006-04-17 14:45 UTC (permalink / raw)
To: Dan Williams; +Cc: netdev, hostap, Pavel Roskin
On Mon, Apr 17, 2006 at 10:34:03AM -0400, Dan Williams wrote:
> Pavel posted to netdev originally on Friday April 14th with the patch
> included in the email, with the title "[PATCH] Fix crash on big-endian
> systems during scan"...
>
> http://www.spinics.net/lists/netdev/msg03023.html
>
> Sure you don't have it somewhere? If not, I'm sure somebody can
> resend...
I must have fat-fingered a delete...sorry!
A repost would be most welcome...
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 14:45 ` John W. Linville
@ 2006-04-17 15:01 ` Dan Williams
2006-04-17 15:17 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Dan Williams @ 2006-04-17 15:01 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, hostap, Pavel Roskin
On Mon, 2006-04-17 at 10:45 -0400, John W. Linville wrote:
> On Mon, Apr 17, 2006 at 10:34:03AM -0400, Dan Williams wrote:
>
> > Pavel posted to netdev originally on Friday April 14th with the patch
> > included in the email, with the title "[PATCH] Fix crash on big-endian
> > systems during scan"...
> >
> > http://www.spinics.net/lists/netdev/msg03023.html
> >
> > Sure you don't have it somewhere? If not, I'm sure somebody can
> > resend...
>
> I must have fat-fingered a delete...sorry!
>
> A repost would be most welcome...
I think Pavel just resent the patch with a "(repost)" at the end of the
subject line.
Dan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 15:01 ` Dan Williams
@ 2006-04-17 15:17 ` John W. Linville
2006-04-17 15:36 ` Dan Williams
0 siblings, 1 reply; 9+ messages in thread
From: John W. Linville @ 2006-04-17 15:17 UTC (permalink / raw)
To: Dan Williams; +Cc: netdev, hostap, Pavel Roskin
On Mon, Apr 17, 2006 at 11:01:29AM -0400, Dan Williams wrote:
> On Mon, 2006-04-17 at 10:45 -0400, John W. Linville wrote:
> > On Mon, Apr 17, 2006 at 10:34:03AM -0400, Dan Williams wrote:
> >
> > > Pavel posted to netdev originally on Friday April 14th with the patch
> > > included in the email, with the title "[PATCH] Fix crash on big-endian
> > > systems during scan"...
> > >
> > > http://www.spinics.net/lists/netdev/msg03023.html
> > >
> > > Sure you don't have it somewhere? If not, I'm sure somebody can
> > > resend...
> >
> > I must have fat-fingered a delete...sorry!
> >
> > A repost would be most welcome...
>
> I think Pavel just resent the patch with a "(repost)" at the end of the
> subject line.
Hmmm...Randy Dunlap said offline that he had reposted, but I haven't
seen one from him either...is it a big patch?
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 15:17 ` John W. Linville
@ 2006-04-17 15:36 ` Dan Williams
2006-04-17 16:44 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Dan Williams @ 2006-04-17 15:36 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, hostap, Pavel Roskin
On Mon, 2006-04-17 at 11:17 -0400, John W. Linville wrote:
> On Mon, Apr 17, 2006 at 11:01:29AM -0400, Dan Williams wrote:
> > On Mon, 2006-04-17 at 10:45 -0400, John W. Linville wrote:
> > > On Mon, Apr 17, 2006 at 10:34:03AM -0400, Dan Williams wrote:
> > >
> > > > Pavel posted to netdev originally on Friday April 14th with the patch
> > > > included in the email, with the title "[PATCH] Fix crash on big-endian
> > > > systems during scan"...
> > > >
> > > > http://www.spinics.net/lists/netdev/msg03023.html
> > > >
> > > > Sure you don't have it somewhere? If not, I'm sure somebody can
> > > > resend...
> > >
> > > I must have fat-fingered a delete...sorry!
> > >
> > > A repost would be most welcome...
> >
> > I think Pavel just resent the patch with a "(repost)" at the end of the
> > subject line.
>
> Hmmm...Randy Dunlap said offline that he had reposted, but I haven't
> seen one from him either...is it a big patch?
Two liner...
From: Pavel Roskin <proski@gnu.org>
The original code was doing arithmetics on a little-endian value.
Reported by Stelios Koroneos <stelios@stelioscellar.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
drivers/net/wireless/hostap/hostap_ioctl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 8b37e82..8399de5 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1860,7 +1860,7 @@ static char * __prism2_translate_scan(lo
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWFREQ;
if (scan) {
- chan = scan->chid;
+ chan = le16_to_cpu(scan->chid);
} else if (bss) {
chan = bss->chan;
} else {
@@ -1868,7 +1868,7 @@ static char * __prism2_translate_scan(lo
}
if (chan > 0) {
- iwe.u.freq.m = freq_list[le16_to_cpu(chan - 1)] * 100000;
+ iwe.u.freq.m = freq_list[chan - 1] * 100000;
iwe.u.freq.e = 1;
current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
IW_EV_FREQ_LEN);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix crash on big-endian systems during scan
2006-04-17 15:36 ` Dan Williams
@ 2006-04-17 16:44 ` John W. Linville
0 siblings, 0 replies; 9+ messages in thread
From: John W. Linville @ 2006-04-17 16:44 UTC (permalink / raw)
To: Dan Williams; +Cc: netdev, hostap, Pavel Roskin
On Mon, Apr 17, 2006 at 11:36:43AM -0400, Dan Williams wrote:
> On Mon, 2006-04-17 at 11:17 -0400, John W. Linville wrote:
> > On Mon, Apr 17, 2006 at 11:01:29AM -0400, Dan Williams wrote:
> > > On Mon, 2006-04-17 at 10:45 -0400, John W. Linville wrote:
> > > > On Mon, Apr 17, 2006 at 10:34:03AM -0400, Dan Williams wrote:
> > > >
> > > > > Pavel posted to netdev originally on Friday April 14th with the patch
> > > > > included in the email, with the title "[PATCH] Fix crash on big-endian
> > > > > systems during scan"...
> > > > >
> > > > > http://www.spinics.net/lists/netdev/msg03023.html
> > > > >
> > > > > Sure you don't have it somewhere? If not, I'm sure somebody can
> > > > > resend...
> > > >
> > > > I must have fat-fingered a delete...sorry!
> > > >
> > > > A repost would be most welcome...
> > >
> > > I think Pavel just resent the patch with a "(repost)" at the end of the
> > > subject line.
> >
> > Hmmm...Randy Dunlap said offline that he had reposted, but I haven't
> > seen one from him either...is it a big patch?
>
> Two liner...
>
> From: Pavel Roskin <proski@gnu.org>
>
> The original code was doing arithmetics on a little-endian value.
> Reported by Stelios Koroneos <stelios@stelioscellar.com>
>
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
Got this one...thanks!
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-04-17 16:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-14 21:59 [PATCH] Fix crash on big-endian systems during scan Pavel Roskin
2006-04-17 1:06 ` Jouni Malinen
2006-04-17 13:21 ` John W. Linville
2006-04-17 14:34 ` Dan Williams
2006-04-17 14:45 ` John W. Linville
2006-04-17 15:01 ` Dan Williams
2006-04-17 15:17 ` John W. Linville
2006-04-17 15:36 ` Dan Williams
2006-04-17 16:44 ` John W. Linville
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).