]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
sctp: don't hold the assoc create lock longer than needed
authorMichael Tuexen <tuexen@FreeBSD.org>
Sun, 20 Feb 2022 13:55:41 +0000 (14:55 +0100)
committerMichael Tuexen <tuexen@FreeBSD.org>
Sun, 20 Feb 2022 13:55:41 +0000 (14:55 +0100)
Reported by: syzbot+c738e3df67cf425c49a2@syzkaller.appspotmail.com
MFC after: 3 days

sys/netinet/sctp_output.c

index 3d81fb2b42882881a2005ca6e6789c25ad6da9f4..86cf2ed75e90903cc3523dda7f83912e626b495d 100644 (file)
@@ -12716,6 +12716,8 @@ sctp_lower_sosend(struct socket *so,
                } else {
                        SCTP_TCB_LOCK_ASSERT(stcb);
                        hold_tcblock = true;
+                       SCTP_ASOC_CREATE_UNLOCK(inp);
+                       create_lock_applied = false;
                }
                if (error) {
                        goto out_unlocked;