From: Alexander Aring <alex.aring@gmail.com>
To: Martin Townsend <mtownsend1973@gmail.com>
Cc: linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org,
marcel@holtmann.org, jukka.rissanen@linux.intel.com,
Martin Townsend <martin.townsend@xsilon.com>
Subject: Re: [PATCH v3 bluetooth-next] 6lowpan: Use pskb_expand_head in IPHC decompression.
Date: Wed, 8 Oct 2014 10:06:19 +0200 [thread overview]
Message-ID: <20141008080618.GB32554@omega> (raw)
In-Reply-To: <20141008075458.GA32554@omega>
Hi Martin,
On Wed, Oct 08, 2014 at 09:54:58AM +0200, Alexander Aring wrote:
...
>
> here we lost the skb reference from parameter if failed and I don't see
> that skb_unshare free it on failing (maybe I am wrong here).
>
I will do this step by step.
1. call skb_unshare
2. check if cloned
3. call skb_copy
4. call __alloc_skb
5. __alloc_skb return NULL
6. assign to temp nskb;
7. parameter skb will be freed. kfree_skb(skb).
8. skb = nskb;
9. return skb;
So I see that kfree_skb(skb) is always called also on failure.
So your code seems to be correct. This is a lack of documentation.
- Alex
next prev parent reply other threads:[~2014-10-08 8:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 7:35 [PATCH v3 bluetooth-next] 6lowpan: Use pskb_expand_head in IPHC decompression Martin Townsend
2014-10-08 7:35 ` Martin Townsend
2014-10-08 7:55 ` Alexander Aring
2014-10-08 8:06 ` Alexander Aring [this message]
2014-10-08 8:10 ` Martin Townsend
2014-10-08 8:10 ` 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=20141008080618.GB32554@omega \
--to=alex.aring@gmail.com \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=martin.townsend@xsilon.com \
--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).