Discussion:
prism2_usb 0.2.8 (svn) causes oops with kernel 2.6.20-rc6
Tom K
2007-02-02 13:19:00 UTC
Permalink
I've built svn rev 1821, applying this patch for the 2.6.20 kernel:

http://lists.linux-wlan.com/pipermail/linux-wlan-devel/2007-January/003628.html
(Many thanks btw, Pavel - I forgot to say that earlier).

The module builds, installs, and loads without error, but the
lnxreq_autojoin command causes a kernel oops, as in this screenshot:

Loading Image...

(Screenshot from a VMware install, but consistently reproducible when
running natively).

Thanks and regards
Tom Killian
Solomon Peachy
2007-02-02 14:59:44 UTC
Permalink
Post by Tom K
The module builds, installs, and loads without error, but the
Was there any output before the first oops in the screenshot? (null pointer
reference, for example? Any 'linkstatus=XXX' messages?) You should turn
on full console printk output, and ideally do a debugging build of wlan-ng:

echo 10 10 10 10 > /proc/sys/kernel/printk

Meanwhile, both oopsen seem to be the same thing, and I suspect it's line 2425 of
prism2sta.c -- but this doesn't seem to be the root cause of these crashes; seeing
all earlier output would be helpful.

To resolve where in I need you to build the driver with '-g' (edit p80211/Makefile
and prism2/driver/Makefile and add '-g' to the EXTRA_CFLAGS line). Then we can
load this up into gdb and find out what line of code corresponds to the crash.

- Solomon
--
Solomon Peachy ***@linux-wlan.com
AbsoluteValue Systems http://www.linux-wlan.com
721-D North Drive +1 (321) 259-0737 (office)
Melbourne, FL 32934 +1 (321) 259-0286 (fax)
Tom K
2007-02-02 16:30:21 UTC
Permalink
Post by Solomon Peachy
Post by Tom K
The module builds, installs, and loads without error, but the
Was there any output before the first oops in the screenshot? (null pointer
reference, for example? Any 'linkstatus=XXX' messages?) You should turn
echo 10 10 10 10 > /proc/sys/kernel/printk
Meanwhile, both oopsen seem to be the same thing, and I suspect it's line 2425 of
prism2sta.c -- but this doesn't seem to be the root cause of these crashes; seeing
all earlier output would be helpful.
To resolve where in I need you to build the driver with '-g' (edit p80211/Makefile
and prism2/driver/Makefile and add '-g' to the EXTRA_CFLAGS line). Then we can
load this up into gdb and find out what line of code corresponds to the crash.
- Solomon
Thanks. I'll do that asap.
Pavel Roskin
2007-02-02 16:50:38 UTC
Permalink
Post by Tom K
Post by Solomon Peachy
Meanwhile, both oopsen seem to be the same thing, and I suspect it's line 2425 of
prism2sta.c -- but this doesn't seem to be the root cause of these crashes; seeing
all earlier output would be helpful.
I'm sure it's the consequence of my patch for Linux 2.6.20 INIT_WORK.
prism2sta_commsqual_defer() didn't get the hw value properly. It was
casting (struct work_struct *) to (hfa384x_t *)

The new API helps avoid such unsafe casts, but only for the code written
anew. It doesn't help is the cast is already there.
Post by Tom K
Post by Solomon Peachy
To resolve where in I need you to build the driver with '-g' (edit p80211/Makefile
and prism2/driver/Makefile and add '-g' to the EXTRA_CFLAGS line). Then we can
load this up into gdb and find out what line of code corresponds to the crash.
- Solomon
Thanks. I'll do that asap.
Better try the new INIT_WORK patch.
--
Regards,
Pavel Roskin
richard
2007-02-02 15:06:50 UTC
Permalink
Post by Tom K
http://lists.linux-wlan.com/pipermail/linux-wlan-devel/2007-January/003628.html
(Many thanks btw, Pavel - I forgot to say that earlier).
The module builds, installs, and loads without error, but the
http://www.archlinux.org/~tom/wlan-ng/prism2.png
looking at the patch it seems as though it's missing a container_of at
the top of prism2sta_commsqual_defer

so something like this :
- hfa384x_t *hw = (hfa384x_t *) data;
+ hfa384x_t *hw = container_of(data, struct hfa384x, ???? );

but I don't know what to fill in ??? .

I'm not running 2.6.20 yet so I'm sorry that I can't be of any more help.

Cheers
Richard
Pavel Roskin
2007-02-02 15:36:49 UTC
Permalink
Post by richard
looking at the patch it seems as though it's missing a container_of at
the top of prism2sta_commsqual_defer
Yes. Sorry, I missed several cases.
Post by richard
- hfa384x_t *hw = (hfa384x_t *) data;
+ hfa384x_t *hw = container_of(data, struct hfa384x, ???? );
but I don't know what to fill in ??? .
The field used in the first argument of INIT_WORK2.

The fixed patch is attached.
--
Regards,
Pavel Roskin
Solomon Peachy
2007-02-28 17:25:33 UTC
Permalink
Post by Pavel Roskin
The fixed patch is attached.
After finally wrapping my head around 2.6.20's changes, I've applied the
patch to SVN.

Sorry about the delay.

- Solomon
--
Solomon Peachy ***@linux-wlan.com
AbsoluteValue Systems http://www.linux-wlan.com
721-D North Drive +1 (321) 259-0737 (office)
Melbourne, FL 32934 +1 (321) 259-0286 (fax)
Loading...