Subject: Re: [PATCHv2] sctp: fix warning at inet_sock_destruct() while release sctp socket

From: Vlad Yasevich <[email-masked]>
Date: Mon, 06 Jul 2009 09:45:01 -0400

Herbert Xu wrote:
> On Mon, Jul 06, 2009 at 01:45:48PM +0800, Wei Yongjun wrote:
>> Commit 'net: Move rx skb_orphan call to where needed' broken sctp protocol
>> with warning at inet_sock_destruct(). Actually, sctp can do this right with
>> sctp_sock_rfree_frag() and sctp_skb_set_owner_r_frag() pair.
>>
>>     sctp_sock_rfree_frag(skb);
>>     sctp_skb_set_owner_r_frag(skb, newsk);
>>
>> This patch not revert the commit d55d87fdff8252d0e2f7c28c2d443aee17e9d70f,
>> instead remove the sctp_sock_rfree_frag() function.
> 
> It took me a while to understand your patch but yeah it does seem
> to be the right fix.  So essentially we were freeing the packet
> twice as my newly added skb_orphan in sctp_skb_set_owner_r is
> repeating what sctp_sock_rfree_frag has already done for the
> migration case.
> 
> While your patch simply eliminates sctp_sock_rfree_frag so that
> we only free things once.
>  

Yep, I agree.

>> Signed-off-by: Wei Yongjun <[email-masked]>
> 
> Acked-by: Herbert Xu <[email-masked]>

Acked-by: Vlad Yasevich <[email-masked]>

> Thanks,