Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276990
b: refs/heads/master
c: a0a129f
h: refs/heads/master
v: v3
  • Loading branch information
Xi Wang authored and David S. Miller committed Dec 23, 2011
1 parent 14ceb46 commit 86368d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e688a604807647c9450f9c12a7cb6d027150a895
refs/heads/master: a0a129f8b6cff54ab479324a54aefdab5db4f240
7 changes: 5 additions & 2 deletions trunk/net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,14 @@ static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
if (count) {
int i;

if (count > 1<<30) {
if (count > INT_MAX)
return -EINVAL;
count = roundup_pow_of_two(count);
if (count > (ULONG_MAX - sizeof(struct rps_dev_flow_table))
/ sizeof(struct rps_dev_flow)) {
/* Enforce a limit to prevent overflow */
return -EINVAL;
}
count = roundup_pow_of_two(count);
table = vmalloc(RPS_DEV_FLOW_TABLE_SIZE(count));
if (!table)
return -ENOMEM;
Expand Down

0 comments on commit 86368d6

Please sign in to comment.