Re: CVS version hangs the computer


From: Jouni Malinen (jkmaline_at_cc.hut.fi)
Date: 2002-09-01 04:50:37 UTC



On Sat, Aug 31, 2002 at 04:01:53PM -0700, Erik Walthinsen wrote:

> about to call skb_put() at driver/modules/hostap_hw.c:2482 in prism2_rx rxdesc
> skput:over: c10310cf:0 put:60 dev:<NULL>kernel BuG at skbuff.c:92!

That skput:over is quite helpful since it gives code address (c10310cf) to the caller of skb_put(). If you compile Host AP module with an added option '-g' on CFLAGS, you should even be able to use addr2line to convert that address directly to a file name and line number.. Just get the start address of the text segment for the module in question from /proc/ksyms (grep hostap.*.S.text /proc/ksyms) and subtract that from the address on skput:over line. Give the end result to 'addr2line -e hostap_??.o <addr>'.

> prism2_rx() { ...
> skb = dev_alloc_skb(sizeof(*rxdesc) + len);
> if (!skb) {
> printk(KERN_DEBUG "%s: RX failed to allocate "
> "skb for management frame\n",
> dev->name);
> goto rx_dropped;
> }
> debug_skb_put("prism2_rx rxdesc");
> memcpy(skb_put(skb, sizeof(*rxdesc)), rxdesc,
> sizeof(*rxdesc));
> debug_skb_put("prism2_rx skb");

Yes, the skb_put was for 60 bytes and rxdesc is that long. However, the 0 before put:60 should be skb->len _after_ the added 60.. This looks quite odd since it should be 60 at that point and anyway, the dev_alloc_skb just above seems to allocate enough space.. Unless I have missed something here, this looks that something is completely messed up. Please test with unmodified latest CVS version and make sure it is compiled cleanly. Btw, what compiler version are you using?

-- 
Jouni Malinen                                            PGP id EFC895FA


This archive was generated by hypermail 2.1.4.