On 04/14/2014 12:47 PM, Butler, Peter wrote: > Glad to be of help :o) > Hi Peter Would you be able to run this test again with the following patch on top of the problematic code. Thanks -vlad commit c9888a220916284403c5115d6c6c7e33a00d0b55 Author: Vlad Yasevich <vyasevic@xxxxxxxxxx> Date: Thu Apr 17 09:21:52 2014 -0400 sctp: Trigger window update SACK after skb has been freed. Signed-off-by: Vlad Yasevich <vyasevic@xxxxxxxxxx> diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index 8d198ae..b59a7c5 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c @@ -1011,7 +1011,6 @@ static void sctp_ulpevent_release_data(struct sctp_ulpevent *event) { struct sk_buff *skb, *frag; unsigned int len; - struct sctp_association *asoc; /* Current stack structures assume that the rcv buffer is * per socket. For UDP style sockets this is not true as @@ -1036,11 +1035,7 @@ static void sctp_ulpevent_release_data(struct sctp_ulpevent *event) } done: - asoc = event->asoc; - sctp_association_hold(asoc); sctp_ulpevent_release_owner(event); - sctp_assoc_rwnd_update(asoc, true); - sctp_association_put(asoc); } static void sctp_ulpevent_release_frag_data(struct sctp_ulpevent *event) @@ -1071,12 +1066,21 @@ done: */ void sctp_ulpevent_free(struct sctp_ulpevent *event) { + struct sctp_association *asoc = event->asoc; + if (sctp_ulpevent_is_notification(event)) sctp_ulpevent_release_owner(event); else sctp_ulpevent_release_data(event); kfree_skb(sctp_event2skb(event)); + /* The socket is locked and the assocaiton can't go anywhere + * since we are walking the uplqueue. No need to hold + * another ref on the association. Now that the skb has been + * freed and accounted for everywhere, see if we need to send + * a window update SACK. + */ + sctp_assoc_rwnd_update(asoc, true); } /* Purge the skb lists holding ulpevents. */ -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html