aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-10-11 15:30:34 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-11 15:30:34 -0400
commitd122179a3c0fdc71b88cb9e3605f372b1651a9ff (patch)
tree63a48b333e7565967b6d7c9e246557bfcb9f225f /net/core
parent419c20465d6319274e7286f0966e2390540e6e0a (diff)
parentb00916b189d13a615ff05c9242201135992fcda3 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/core/ethtool.c
Diffstat (limited to 'net/core')
-rw-r--r--net/core/ethtool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 7d7e572cedc7..685c7005e87f 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -355,7 +355,7 @@ static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev,
355 if (info.cmd == ETHTOOL_GRXCLSRLALL) { 355 if (info.cmd == ETHTOOL_GRXCLSRLALL) {
356 if (info.rule_cnt > 0) { 356 if (info.rule_cnt > 0) {
357 if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32)) 357 if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32))
358 rule_buf = kmalloc(info.rule_cnt * sizeof(u32), 358 rule_buf = kzalloc(info.rule_cnt * sizeof(u32),
359 GFP_USER); 359 GFP_USER);
360 if (!rule_buf) 360 if (!rule_buf)
361 return -ENOMEM; 361 return -ENOMEM;
@@ -404,7 +404,7 @@ static noinline_for_stack int ethtool_get_rxfh_indir(struct net_device *dev,
404 (KMALLOC_MAX_SIZE - sizeof(*indir)) / sizeof(*indir->ring_index)) 404 (KMALLOC_MAX_SIZE - sizeof(*indir)) / sizeof(*indir->ring_index))
405 return -ENOMEM; 405 return -ENOMEM;
406 full_size = sizeof(*indir) + sizeof(*indir->ring_index) * table_size; 406 full_size = sizeof(*indir) + sizeof(*indir->ring_index) * table_size;
407 indir = kmalloc(full_size, GFP_USER); 407 indir = kzalloc(full_size, GFP_USER);
408 if (!indir) 408 if (!indir)
409 return -ENOMEM; 409 return -ENOMEM;
410 410
@@ -579,7 +579,7 @@ static int ethtool_get_rx_ntuple(struct net_device *dev, void __user *useraddr)
579 579
580 gstrings.len = ret; 580 gstrings.len = ret;
581 581
582 data = kmalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER); 582 data = kzalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER);
583 if (!data) 583 if (!data)
584 return -ENOMEM; 584 return -ENOMEM;
585 585