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-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