summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.h
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2009-07-28 14:09:06 +0000
committerrrs <rrs@FreeBSD.org>2009-07-28 14:09:06 +0000
commitd0539309e63ba3dbebc5250db903d7a6bb8290b3 (patch)
tree9e24d0becd12325b1811933aaaf8795ed1a4f1a1 /sys/netinet/sctputil.h
parentbf5de47722753ed785054f03efe75c8de61a0210 (diff)
downloadFreeBSD-src-d0539309e63ba3dbebc5250db903d7a6bb8290b3.zip
FreeBSD-src-d0539309e63ba3dbebc5250db903d7a6bb8290b3.tar.gz
Turns out that when a receiver forwards through its TNS's the
processing code holds the read lock (when processing a FWD-TSN for pr-sctp). If it finds stranded data that can be given to the application, it calls sctp_add_to_readq(). The readq function also grabs this lock. So if INVAR is on we get a double recurse on a non-recursive lock and panic. This fix will change it so that readq() function gets a flag to tell if the lock is held, if so then it does not get the lock. Approved by: re@freebsd.org (Kostik Belousov) MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctputil.h')
-rw-r--r--sys/netinet/sctputil.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h
index c5a2ad9..89657e7 100644
--- a/sys/netinet/sctputil.h
+++ b/sys/netinet/sctputil.h
@@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$");
#if defined(_KERNEL) || defined(__Userspace__)
+#define SCTP_READ_LOCK_HELD 1
+#define SCTP_READ_LOCK_NOT_HELD 0
#ifdef SCTP_ASOCLOG_OF_TSNS
void sctp_print_out_track_log(struct sctp_tcb *stcb);
@@ -103,6 +105,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp,
struct sctp_queued_to_read *control,
struct sockbuf *sb,
int end,
+ int inpread_locked,
int so_locked
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
SCTP_UNUSED
OpenPOWER on IntegriCloud