Fix hangs caused by overzealous code removal.
Thanks, Nickolay, for figuring out this is the problem. Submitted by: Nickolay Dudorov <nnd@mail.nsk.ru>
This commit is contained in:
parent
e2b41a622b
commit
b6240737d5
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user