]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
[SCTP]: Make sure the chunk is off the transmitted list prior to freeing.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 5 Feb 2008 19:23:44 +0000 (14:23 -0500)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 7 Feb 2008 02:27:39 +0000 (21:27 -0500)
In a few instances, we need to remove the chunk from the transmitted list
prior to freeing it.  This is because the free code doesn't do that any
more and so we need to do it manually.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/outqueue.c
net/sctp/sm_make_chunk.c

index 3c2a281347e1c14d30050cc770f811eb882bc2c7..1bb3c5c35d2ab5fc78f252d2edc9e1f2c70b6dab 100644 (file)
@@ -1179,8 +1179,10 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
                tchunk = list_entry(lchunk, struct sctp_chunk,
                                    transmitted_list);
                tsn = ntohl(tchunk->subh.data_hdr->tsn);
-               if (TSN_lte(tsn, ctsn))
+               if (TSN_lte(tsn, ctsn)) {
+                       list_del_init(&tchunk->transmitted_list);
                        sctp_chunk_free(tchunk);
+               }
        }
 
        /* ii) Set rwnd equal to the newly received a_rwnd minus the
index 80b3c4f09e6c18cd55149359cdb5e0b83e3628e1..e45be4e3f80d733c8f3eb27773651ad1a4d44add 100644 (file)
@@ -3224,6 +3224,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
        }
 
        /* Free the cached last sent asconf chunk. */
+       list_del_init(&asconf->transmitted_list);
        sctp_chunk_free(asconf);
        asoc->addip_last_asconf = NULL;