aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--net/core/sysctl_net_core.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ab3b7cef4638..d115256ed5a2 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -653,7 +653,8 @@ struct rps_dev_flow_table {
653 */ 653 */
654struct rps_sock_flow_table { 654struct rps_sock_flow_table {
655 u32 mask; 655 u32 mask;
656 u32 ents[0]; 656
657 u32 ents[0] ____cacheline_aligned_in_smp;
657}; 658};
658#define RPS_SOCK_FLOW_TABLE_SIZE(_num) (offsetof(struct rps_sock_flow_table, ents[_num])) 659#define RPS_SOCK_FLOW_TABLE_SIZE(_num) (offsetof(struct rps_sock_flow_table, ents[_num]))
659 660
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;