aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index c201b26879a1..e64d5210ed13 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -752,15 +752,12 @@ static void __sctp_unhash_endpoint(struct sctp_endpoint *ep)
752 752
753 epb = &ep->base; 753 epb = &ep->base;
754 754
755 if (hlist_unhashed(&epb->node))
756 return;
757
758 epb->hashent = sctp_ep_hashfn(epb->bind_addr.port); 755 epb->hashent = sctp_ep_hashfn(epb->bind_addr.port);
759 756
760 head = &sctp_ep_hashtable[epb->hashent]; 757 head = &sctp_ep_hashtable[epb->hashent];
761 758
762 sctp_write_lock(&head->lock); 759 sctp_write_lock(&head->lock);
763 __hlist_del(&epb->node); 760 hlist_del_init(&epb->node);
764 sctp_write_unlock(&head->lock); 761 sctp_write_unlock(&head->lock);
765} 762}
766 763
@@ -841,7 +838,7 @@ static void __sctp_unhash_established(struct sctp_association *asoc)
841 head = &sctp_assoc_hashtable[epb->hashent]; 838 head = &sctp_assoc_hashtable[epb->hashent];
842 839
843 sctp_write_lock(&head->lock); 840 sctp_write_lock(&head->lock);
844 __hlist_del(&epb->node); 841 hlist_del_init(&epb->node);
845 sctp_write_unlock(&head->lock); 842 sctp_write_unlock(&head->lock);
846} 843}
847 844