View | Details | Raw Unified | Return to bug 212716 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/kern/uipc_sockbuf.c (+2 lines)
Lines 456-461 sbwait(struct socket *so, sb_which which) Link Here
456
	SOCK_BUF_LOCK_ASSERT(so, which);
456
	SOCK_BUF_LOCK_ASSERT(so, which);
457
457
458
	sb = sobuf(so, which);
458
	sb = sobuf(so, which);
459
	KASSERT((sb->sb_state & (SBS_CANTRCVMORE | SBS_CANTSENDMORE)) == 0,
460
	    ("sbwait: %s", (which == SO_RCV) ? "CANTRCVMORE" : "CANTSENDMORE"));
459
	sb->sb_flags |= SB_WAIT;
461
	sb->sb_flags |= SB_WAIT;
460
	return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which),
462
	return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which),
461
	    (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait",
463
	    (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait",
(-)b/sys/kern/uipc_socket.c (-1 / +5 lines)
Lines 2429-2434 soreceive_generic(struct socket *so, struct sockaddr **psa, struct uio *uio, Link Here
2429
				VNET_SO_ASSERT(so);
2429
				VNET_SO_ASSERT(so);
2430
				pr->pr_rcvd(so, flags);
2430
				pr->pr_rcvd(so, flags);
2431
				SOCKBUF_LOCK(&so->so_rcv);
2431
				SOCKBUF_LOCK(&so->so_rcv);
2432
				if (so->so_rcv.sb_mb == NULL) {
2433
					if (so->so_error || so->so_rerror ||
2434
					    so->so_rcv.sb_state & SBS_CANTRCVMORE)
2435
						break;
2436
				}
2432
			}
2437
			}
2433
			SBLASTRECORDCHK(&so->so_rcv);
2438
			SBLASTRECORDCHK(&so->so_rcv);
2434
			SBLASTMBUFCHK(&so->so_rcv);
2439
			SBLASTMBUFCHK(&so->so_rcv);
2435
- 

Return to bug 212716