]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sctp/associola.c
Merge tag 'asm-generic-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd...
[linux.git] / net / sctp / associola.c
index 6a28b96e779e68d5259138e11da17c1216e18b71..914750b819b2661986a1dca9d0b049a68d020e67 100644 (file)
@@ -118,9 +118,6 @@ static struct sctp_association *sctp_association_init(
        asoc->flowlabel = sp->flowlabel;
        asoc->dscp = sp->dscp;
 
-       /* Initialize default path MTU. */
-       asoc->pathmtu = sp->pathmtu;
-
        /* Set association default SACK delay */
        asoc->sackdelay = msecs_to_jiffies(sp->sackdelay);
        asoc->sackfreq = sp->sackfreq;
@@ -252,6 +249,10 @@ static struct sctp_association *sctp_association_init(
                             0, gfp))
                goto fail_init;
 
+       /* Initialize default path MTU. */
+       asoc->pathmtu = sp->pathmtu;
+       sctp_assoc_update_frag_point(asoc);
+
        /* Assume that peer would support both address types unless we are
         * told otherwise.
         */
@@ -434,7 +435,7 @@ static void sctp_association_destroy(struct sctp_association *asoc)
 
        WARN_ON(atomic_read(&asoc->rmem_alloc));
 
-       kfree(asoc);
+       kfree_rcu(asoc, rcu);
        SCTP_DBG_OBJCNT_DEC(assoc);
 }