diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index a11f9379047698886713a0f56a950bf93dd367b3..feada358d872f3bc5622f5787078fde4cbfa6a97 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -2075,6 +2075,8 @@ struct sctp_association { __u64 abandoned_unsent[SCTP_PR_INDEX(MAX) + 1]; __u64 abandoned_sent[SCTP_PR_INDEX(MAX) + 1]; + + struct rcu_head rcu; }; diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 6a28b96e779e68d5259138e11da17c1216e18b71..3702f48a931dfd4b619306eb686a2a4025a64735 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -434,7 +434,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); }