]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/proc.c
Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus
[karo-tx-linux.git] / net / sctp / proc.c
index 4e45ee35d0db149582c4435462baf253647d7774..62526c4770505e0f741123bd009e91a90781f587 100644 (file)
@@ -134,9 +134,15 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo
        struct sctp_af *af;
 
        if (epb->type == SCTP_EP_TYPE_ASSOCIATION) {
-           asoc = sctp_assoc(epb);
-           peer = asoc->peer.primary_path;
-           primary = &peer->saddr;
+               asoc = sctp_assoc(epb);
+
+               peer = asoc->peer.primary_path;
+               if (unlikely(peer == NULL)) {
+                       WARN(1, "Association %p with NULL primary path!\n", asoc);
+                       return;
+               }
+
+               primary = &peer->saddr;
        }
 
        rcu_read_lock();