diff options
author | Xi Wang <xi.wang@gmail.com> | 2011-12-16 07:44:15 -0500 |
---|---|---|
committer | Brad Figg <brad.figg@canonical.com> | 2012-01-23 18:36:13 -0500 |
commit | 22b478bc9f784a9e52b119a50ad8263a95e7cfc2 (patch) | |
tree | c54e32639b1691e1dac70d574dcf659bd39b80e6 /net/sctp/outqueue.c | |
parent | 77af7f6d37226f7836adcfa1130bf505a99e8a52 (diff) |
sctp: fix incorrect overflow check on autoclose
BugLink: http://bugs.launchpad.net/bugs/913373
[ Upstream commit 2692ba61a82203404abd7dd2a027bda962861f74 ]
Commit 8ffd3208 voids the previous patches f6778aab and 810c0719 for
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 <vladislav.yasevich@hp.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Diffstat (limited to 'net/sctp/outqueue.c')
0 files changed, 0 insertions, 0 deletions