Re: [RFC PATCH] _rpc_dtablesize: Decrease the value of size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25 Oct 2023, at 12:27, Zhuohao Bai wrote:

> In the client code, the function _rpc_dtablesize() is used to determine the memory allocation for the __svc_xports array.
>
> However, some operating systems (including the recent Manjaro OS) can have _SC_OPEN_MAX values as high as 1073741816, which can cause the __svc_xports array to become too large. This results in the process being killed.

This is addressed by several users of rpc_dtablesize() already, which all seem to do:

    setsize = _rpc_dtablesize();
    if (setsize > FD_SETSIZE)
        setsize = FD_SETSIZE;

Does it make sense to try to fix it for everyone, and should we clean up the users?

Ben





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux