summaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 11:57:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 11:57:00 -0700
commit72992bc1fdbb7d6f5ede60e02fee87e81ef98ace (patch)
treea24b6da35edd7b4a254a0ec920817c12da862bb0 /net/sctp/socket.c
parentbad15f2c386d9978ffb5c555e7b10543ff9b4beb (diff)
parent7d132055814ef17a6c7b69f342244c410a5e000f (diff)
downloadlinux-next-72992bc1fdbb7d6f5ede60e02fee87e81ef98ace.tar.gz
Merge 3.10-rc6 into staging-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f631c5ff4dbf..6abb1caf9836 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4003,6 +4003,12 @@ SCTP_STATIC void sctp_destroy_sock(struct sock *sk)
/* Release our hold on the endpoint. */
sp = sctp_sk(sk);
+ /* This could happen during socket init, thus we bail out
+ * early, since the rest of the below is not setup either.
+ */
+ if (sp->ep == NULL)
+ return;
+
if (sp->do_auto_asconf) {
sp->do_auto_asconf = 0;
list_del(&sp->auto_asconf_list);