summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sockbuf.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-08-31 11:31:58 +0000
committergreen <green@FreeBSD.org>2000-08-31 11:31:58 +0000
commitdd66d6917025a4223f25293d5c217e072449ee17 (patch)
tree610e44cd6b6f7dff1ba8830c4fd6787dbf64b7fb /sys/kern/uipc_sockbuf.c
parent23f9ab64bfdec4e9a1f5b04eb9b1e3e8d4022c17 (diff)
downloadFreeBSD-src-dd66d6917025a4223f25293d5c217e072449ee17.zip
FreeBSD-src-dd66d6917025a4223f25293d5c217e072449ee17.tar.gz
Fix hangs caused by overzealous code removal.
Thanks, Nickolay, for figuring out this is the problem. Submitted by: Nickolay Dudorov <nnd@mail.nsk.ru>
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r--sys/kern/uipc_sockbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 1fdc0e1..8016436 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -427,8 +427,8 @@ sbreserve(sb, cc, so, p)
*/
if ((u_quad_t)cc > (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES))
return (0);
- if (p && !chgsbsize(so->so_cred->cr_uid, &sb->sb_hiwat, cc,
- p->p_rlimit[RLIMIT_SBSIZE].rlim_cur)) {
+ if (!chgsbsize(so->so_cred->cr_uid, &sb->sb_hiwat, cc,
+ p ? p->p_rlimit[RLIMIT_SBSIZE].rlim_cur : RLIM_INFINITY)) {
return (0);
}
sb->sb_mbmax = min(cc * sb_efficiency, sb_max);
OpenPOWER on IntegriCloud