diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 040f952..26d22aa 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -168,9 +168,16 @@ static void maybe_unmark_and_push(struct sock *x)
 
 
 static int gc_in_progress = 0;
+#define UNIX_INFLIGHT_TRIGGER_GC 16000
 
 void wait_for_unix_gc(void)
 {
+	/*
+	 * If number of inflight sockets is insane,
+	 * force a garbage collect right now.
+	 */
+	if (atomic_read(&unix_tot_inflight) > UNIX_INFLIGHT_TRIGGER_GC && !gc_in_progress)
+		unix_gc();
 	wait_event(unix_gc_wait, gc_in_progress == 0);
 }
 
