projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6099e3d
)
ethtool: Allocate register dump buffer with vmalloc()
author
Ben Hutchings
<bhutchings@solarflare.com>
Mon, 20 Sep 2010 08:42:17 +0000
(08:42 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 21 Sep 2010 21:57:59 +0000
(14:57 -0700)
Some NICs have huge register files which exceed the maximum heap
allocation size.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/ethtool.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/ethtool.c
b/net/core/ethtool.c
index 91ffce20c36b2f4bf4c87f95ce6fc6c528a8cb46..dae2fd053c2b3c51a8fed31c380e93034bcf04b7 100644
(file)
--- a/
net/core/ethtool.c
+++ b/
net/core/ethtool.c
@@
-815,7
+815,7
@@
static int ethtool_get_regs(struct net_device *dev, char __user *useraddr)
if (regs.len > reglen)
regs.len = reglen;
- regbuf =
kmalloc(reglen, GFP_USER
);
+ regbuf =
vmalloc(reglen
);
if (!regbuf)
return -ENOMEM;
@@
-830,7
+830,7
@@
static int ethtool_get_regs(struct net_device *dev, char __user *useraddr)
ret = 0;
out:
-
k
free(regbuf);
+
v
free(regbuf);
return ret;
}