linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cc: linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org,
	kernel@pengutronix.de, Martin Townsend <mtownsend1973@gmail.com>
Subject: Re: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Date: Tue, 9 Dec 2014 12:52:53 +0100	[thread overview]
Message-ID: <20141209115250.GA32681@omega> (raw)
In-Reply-To: <1418124496.32209.47.camel@jrissane-mobl.ger.corp.intel.com>

Hi Jukka,

On Tue, Dec 09, 2014 at 01:28:16PM +0200, Jukka Rissanen wrote:
> Hi Alex,
> 
> the module unloading caused some issues in the receiving end.
> 
> I tried this:
> * setup bluetooth 6lowpan connection
> * transfer some UDP data
> * unload the nhc_rfc6282_udp module (in one peer only, the other still
> had udp nhc module loaded)
> * try to send more data
> 
> This caused kernel crash in peer that had udp module unloaded:
> 
> 

mhh, okay. I don't know why this happens also the log gave me not much
information, but thanks anyway.

Maybe this is a global issue with bluetooth 6LoWPAN error handling.

Can you simple do something like this:

diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c
index 32ffec6..2228dce 100644
--- a/net/6lowpan/iphc.c
+++ b/net/6lowpan/iphc.c
@@ -425,6 +425,8 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,
                        return -EINVAL;
        }
 
+       return -EINVAL;
+
        /* UDP data uncompression */
        if (iphc0 & LOWPAN_IPHC_NH_C) {
                struct udphdr uh;


based on current bluetooth-next/master without the NHC framework.

This should be working, maybe you never hit any error while calling
lowpan_header_decompress function. It's simple testing the error
handling not more.

Do this please on one node, the other node should send some 6LoWPAN IPHC
packets to check if the error handling working there.





Another issue is that I see that skb->dev isn't set before calling
lowpan_header_decompress. Because inside your log is a "NULL":

(NULL net_device): received unknown nhc id which was not found.

Can you change that? That skb->dev is set to before calling
lowpan_header_decompress.


btw: 802154 has also issues with that the dev is a wpan interface but
should be a lowpan interface. It's a complicated issue because we
support more than one lowpan interface at the same time for _one_ wpan
interface. I will change that later because this has not any useful usecase
at the moment. The new behaviour is then _one_ wpan interface -> _one_ lowpan
interface.

First we need to know if global error handling is working there. Another
solution for the NULL string would be "don't using netdev_foo printouts,
but then nobody knows which interface has this issue.

- Alex

  parent reply	other threads:[~2014-12-09 11:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 15:50 [PATCHv3 bluetooth-next 0/3] 6lowpan: introduce nhc framework Alexander Aring
2014-12-08 15:50 ` [PATCHv3 bluetooth-next 1/3] 6lowpan: add generic nhc layer interface Alexander Aring
2014-12-08 15:50 ` [PATCHv3 bluetooth-next 2/3] 6lowpan: add udp compression via nhc layer Alexander Aring
2014-12-08 15:50 ` [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions Alexander Aring
2014-12-09 11:28   ` Jukka Rissanen
2014-12-09 11:40     ` Jukka Rissanen
2014-12-09 11:52     ` Alexander Aring [this message]
2014-12-09 14:05       ` Jukka Rissanen
2014-12-09 18:42         ` Alexander Aring
2014-12-10  9:04           ` Jukka Rissanen
2014-12-10 11:56             ` Jukka Rissanen
2014-12-10 12:04               ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141209115250.GA32681@omega \
    --to=alex.aring@gmail.com \
    --cc=jukka.rissanen@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=mtownsend1973@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).