aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-02-08 23:39:13 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-09 00:54:09 -0500
commit93c1af6ca94c1e763efba76a127b5c135e3d23a6 (patch)
tree80725b4e6f7b9d10689a7d8a0132db7113d04a30 /net
parentacde2c2d28c8afee41eb67ee1cbf9e47a3f3e475 (diff)
net:rfs: adjust table size checking
Make sure root user does not try something stupid. Also make sure mask field in struct rps_sock_flow_table does not share a cache line with the potentially often dirtied flow table. Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: 567e4b79731c ("net: rfs: add hash collision detection") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/sysctl_net_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 7a31be5e361f..eaa51ddf2368 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -52,7 +52,7 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, int write,
52 52
53 if (write) { 53 if (write) {
54 if (size) { 54 if (size) {
55 if (size > 1<<30) { 55 if (size > 1<<29) {
56 /* Enforce limit to prevent overflow */ 56 /* Enforce limit to prevent overflow */
57 mutex_unlock(&sock_flow_mutex); 57 mutex_unlock(&sock_flow_mutex);
58 return -EINVAL; 58 return -EINVAL;