Re: [PATCH v3 bluetooth-next 0/4] 6lowpan: Move skb delivery out of IPHC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

On Thu, Oct 23, 2014 at 10:51:36AM +0100, Martin Townsend wrote:
> Hi Alex,
> 
> Looks like the SKB is now non-linear which causes the skb_put to assert.  Maybe skb_linearlize will help[0]
> 
> I'll also take a look.

yes, I did also take a fast look at:

"kernel BUG at net/core/skbuff.c:1275!"

But why occurs this now? I think you didn't change anything in this
behaviour in the sequence of skb_put, etc...



I know now why this happens, maybe I can't test it currently fast.

In file net/ieee802154/6lowpan_rtnl.c at function "lowpan_rcv"

case LOWPAN_DISPATCH_FRAG1:     /* first fragment header */
	ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1);
	if (ret == 1) {
		ret = iphc_decompress(skb, &hdr);
		if (ret < 0) 
			goto drop;
	}
	break;
case LOWPAN_DISPATCH_FRAGN:     /* next fragments headers */
	ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAGN);
	if (ret == 1) {
		ret = iphc_decompress(skb, &hdr);
		if (ret < 0) 
			goto drop;
	}
	break;

later you do _ALWAYS_ a "lowpan_give_skb_to_devices". But you changed
now the behaviour, because in case of LOWPAN_DISPATCH_FRAG1 or
LOWPAN_DISPATCH_FRAGN should lowpan_give_skb_to_devices only called when
lowpan_frag_rcv returns 1 and after iphc_decompress.

I think that's your problem. Always call lowpan_give_skb_to_devices
seems to be 100% wrong.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux