aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/associola.c16
-rw-r--r--net/sctp/proc.c4
2 files changed, 18 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 1a21c571aa03..525f97c467e9 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -64,6 +64,7 @@
64/* Forward declarations for internal functions. */ 64/* Forward declarations for internal functions. */
65static void sctp_assoc_bh_rcv(struct work_struct *work); 65static void sctp_assoc_bh_rcv(struct work_struct *work);
66static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc); 66static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc);
67static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc);
67 68
68/* Keep track of the new idr low so that we don't re-use association id 69/* Keep track of the new idr low so that we don't re-use association id
69 * numbers too fast. It is protected by they idr spin lock is in the 70 * numbers too fast. It is protected by they idr spin lock is in the
@@ -446,6 +447,9 @@ void sctp_association_free(struct sctp_association *asoc)
446 /* Free any cached ASCONF_ACK chunk. */ 447 /* Free any cached ASCONF_ACK chunk. */
447 sctp_assoc_free_asconf_acks(asoc); 448 sctp_assoc_free_asconf_acks(asoc);
448 449
450 /* Free the ASCONF queue. */
451 sctp_assoc_free_asconf_queue(asoc);
452
449 /* Free any cached ASCONF chunk. */ 453 /* Free any cached ASCONF chunk. */
450 if (asoc->addip_last_asconf) 454 if (asoc->addip_last_asconf)
451 sctp_chunk_free(asoc->addip_last_asconf); 455 sctp_chunk_free(asoc->addip_last_asconf);
@@ -1578,6 +1582,18 @@ retry:
1578 return error; 1582 return error;
1579} 1583}
1580 1584
1585/* Free the ASCONF queue */
1586static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc)
1587{
1588 struct sctp_chunk *asconf;
1589 struct sctp_chunk *tmp;
1590
1591 list_for_each_entry_safe(asconf, tmp, &asoc->addip_chunk_list, list) {
1592 list_del_init(&asconf->list);
1593 sctp_chunk_free(asconf);
1594 }
1595}
1596
1581/* Free asconf_ack cache */ 1597/* Free asconf_ack cache */
1582static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc) 1598static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc)
1583{ 1599{
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 61aacfbbaa92..05a6ce214714 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -212,7 +212,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
212 sctp_for_each_hentry(epb, node, &head->chain) { 212 sctp_for_each_hentry(epb, node, &head->chain) {
213 ep = sctp_ep(epb); 213 ep = sctp_ep(epb);
214 sk = epb->sk; 214 sk = epb->sk;
215 seq_printf(seq, "%8p %8p %-3d %-3d %-4d %-5d %5d %5lu ", ep, sk, 215 seq_printf(seq, "%8pK %8pK %-3d %-3d %-4d %-5d %5d %5lu ", ep, sk,
216 sctp_sk(sk)->type, sk->sk_state, hash, 216 sctp_sk(sk)->type, sk->sk_state, hash,
217 epb->bind_addr.port, 217 epb->bind_addr.port,
218 sock_i_uid(sk), sock_i_ino(sk)); 218 sock_i_uid(sk), sock_i_ino(sk));
@@ -316,7 +316,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
316 assoc = sctp_assoc(epb); 316 assoc = sctp_assoc(epb);
317 sk = epb->sk; 317 sk = epb->sk;
318 seq_printf(seq, 318 seq_printf(seq,
319 "%8p %8p %-3d %-3d %-2d %-4d " 319 "%8pK %8pK %-3d %-3d %-2d %-4d "
320 "%4d %8d %8d %7d %5lu %-5d %5d ", 320 "%4d %8d %8d %7d %5lu %-5d %5d ",
321 assoc, sk, sctp_sk(sk)->type, sk->sk_state, 321 assoc, sk, sctp_sk(sk)->type, sk->sk_state,
322 assoc->state, hash, 322 assoc->state, hash,