On 2/7/18 1:51 PM, Natanael Copa wrote:
> Hi,
> 
> On Fri, 8 Dec 2017 08:04:00 -0500
> Chet Ramey <chet.ra...@case.edu> wrote:
> 
>> On 12/7/17 5:36 PM, Natanael Copa wrote:
>>> This fixes an issue with bash hanging if user process rlimit is too
>>> high.  
>>
>> Thanks for the report.
>>
> 
> Unfortunately, the proposed patch does not fix the case for 32 bit
> architectures.

That's interesting. It seems to me that the kernel should reject attempts
to set the maximum number of processes larger than 2**(sizeof (pid_t)).

> 
> The bug was introduced with commit a0c0a00f[1].
> 
> I think the proper fix may be re-enable the js.c_childmax capping. What
> do you think?

That's the wrong place. If your original patch identifies the issue
correctly, we need to bound the size of bgpids.storage to something a
pid_t (aliased to ps_index_t) variable can address.

So instead of using js.c_childmax directly, we compute the maximum
table size using js.c_childmax unless it exceeds TYPE_MAXIMUM(pid_t).

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to