public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: wangweidong <wangweidong1@huawei•com>
To: Vlad Yasevich <vyasevich@gmail•com>, <nhorman@tuxdriver•com>
Cc: <dingtianhong@huawei•com>, <davem@davemloft•net>,
	<linux-sctp@vger•kernel.org>, <netdev@vger•kernel.org>
Subject: Re: [PATCH net-next 3/5] sctp: if we done update ssnmap, free the new ssnmap
Date: Fri, 8 Nov 2013 12:30:24 +0800	[thread overview]
Message-ID: <527C68E0.40602@huawei.com> (raw)
In-Reply-To: <527C5F3E.3090200@gmail.com>

On 2013/11/8 11:49, Vlad Yasevich wrote:
> On 11/07/2013 09:55 PM, Wang Weidong wrote:
>> I found that free the old parameters after update the peer parameters.
>> So we should free the new ssnmap which not updated.
>>
>> Signed-off-by: Wang Weidong <wangweidong1@huawei•com>
>> ---
>>   net/sctp/associola.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
>> index 2d53d4c..bca1ad1 100644
>> --- a/net/sctp/associola.c
>> +++ b/net/sctp/associola.c
>> @@ -1223,6 +1223,10 @@ void sctp_assoc_update(struct sctp_association *asoc,
>>           }
>>       }
>>
>> +    /* if we don't update the ssnmap, we should free it. */
>> +    if (new->ssnmap)
>> +        sctp_ssnmap_free(new->ssnmap);
>> +
>>       /* SCTP-AUTH: Save the peer parameters from the new assocaitions
>>        * and also move the association shared keys over
>>        */
>>
> 
> Not necessary.  This will be done when the 'new' association is destroyed.
> 
> -vlad
>

Yeah, it is not necessary done in sctp_assoc_update.
Thanks. 

> 

  reply	other threads:[~2013-11-08  4:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08  2:55 [PATCH net-next 0/5] sctp: fix and clean up Wang Weidong
2013-11-08  2:55 ` [PATCH net-next 1/5] sctp: remove the duplicate initialize Wang Weidong
2013-11-08  2:55 ` [PATCH net-next 2/5] sctp: remove the else path Wang Weidong
2013-11-08  3:00   ` Joe Perches
2013-11-08  3:07     ` wangweidong
2013-11-08 19:19   ` Sergei Shtylyov
2013-11-11  1:57     ` wangweidong
2013-11-08  2:55 ` [PATCH net-next 3/5] sctp: if we done update ssnmap, free the new ssnmap Wang Weidong
2013-11-08  3:49   ` Vlad Yasevich
2013-11-08  4:30     ` wangweidong [this message]
2013-11-08  2:55 ` [PATCH net-next 4/5] sctp: convert sctp_peer_needs_update to boolean Wang Weidong
2013-11-08  2:55 ` [PATCH net-next 5/5] sctp: fix some typos in associola.c Wang Weidong
2013-11-08  6:41 ` [PATCH net-next 0/5] sctp: fix and clean up David Miller

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=527C68E0.40602@huawei.com \
    --to=wangweidong1@huawei$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dingtianhong@huawei$(echo .)com \
    --cc=linux-sctp@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nhorman@tuxdriver$(echo .)com \
    --cc=vyasevich@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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