Re: [PATCH v3 bluetooth-next] 6lowpan: Use pskb_expand_head in IPHC decompression.

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

 



Hi Alex,

On 08/10/14 09:06, Alexander Aring wrote:
> 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.
Yes this caught me out too :)
> So your code seems to be correct. This is a lack of documentation.
>
> - Alex
So is v3 patch good to go?

- Martin.

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




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux