mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 20:34:05 +00:00
Commit8ffd3208voids the previous patchesf6778aaband810c0719for limiting the autoclose value. If userspace passes in -1 on 32-bit platform, the overflow check didn't work and autoclose would be set to 0xffffffff. This patch defines a max_autoclose (in seconds) for limiting the value and exposes it through sysctl, with the following intentions. 1) Avoid overflowing autoclose * HZ. 2) Keep the default autoclose bound consistent across 32- and 64-bit platforms (INT_MAX / HZ in this patch). 3) Keep the autoclose value consistent between setsockopt() and getsockopt() calls. Suggested-by: Vlad Yasevich <[email protected]> Signed-off-by: Xi Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>