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 19:42:52 +0100 [thread overview]
Message-ID: <20141209184250.GB32681@omega> (raw)
In-Reply-To: <1418133949.32209.58.camel@jrissane-mobl.ger.corp.intel.com>
Hi Jukka,
On Tue, Dec 09, 2014 at 04:05:49PM +0200, Jukka Rissanen wrote:
> Hi Alex,
>
> On ti, 2014-12-09 at 12:52 +0100, Alexander Aring wrote:
> > 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.
>
> Hmm, I get the same crash here also without this patchset. So something
> goes wrong if <0 code is returned.
>
Okay, do you already working on it?
> >
> > 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.
>
> I am setting the skb->dev after the call to lowpan_header_decompress().
> And anyway the skb->dev is only used when printing the err.
> Actually should we replace the skb->dev in lowpan_header_decompress()
> with plain dev as that is given to the function as a parameter.
>
Ok, how we introduce this now? You wanna add this do the patch series for
fixing the above issue, or should I add it to my patch series for
introduce nhc framework?
- Alex
next prev parent reply other threads:[~2014-12-09 18:42 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
2014-12-09 14:05 ` Jukka Rissanen
2014-12-09 18:42 ` Alexander Aring [this message]
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=20141209184250.GB32681@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).