ethtool - "vmalloc: allocation failure: 0 bytes" message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
Xenial |
Won't Fix
|
Medium
|
Eric Desrochers |
Bug Description
If ->get_regs_len() callback return 0, we allocate 0 bytes of memory, what print the following warning in kern.log :
vmalloc: allocation failure: 0 bytes
ethtool: page allocation failure: order:0, mode:0x24080c2
CPU: 21 PID: 7668 Comm: ethtool Tainted: G 4.4.0-62-generic #83-Ubuntu
Hardware name:XXXXXXXXXX
0000000000000286 000000005949f325 ffff8801fddcfba8 ffffffff813f7c63
00000000024080c2 ffffffff81ccfe30 ffff8801fddcfc38 ffffffff8119498a
ffffffff81ccfe30 ffff8801fddcfbc8 0000000000000018 ffff8801fddcfc48
Call Trace:
[<ffffffff813f7
[<ffffffff81194
[<ffffffff811d1
[<ffffffff81838
[<ffffffff811d1
[<ffffffff81733
[<ffffffff81733
[<ffffffff81746
[<ffffffff8170d
[<ffffffff8170d
[<ffffffff81222
[<ffffffff8106b
[<ffffffff81222
[<ffffffff81838
break-fix: - 3808d34838184fd
Changed in linux (Ubuntu Xenial): | |
importance: | Undecided → Medium |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in linux (Ubuntu Zesty): | |
importance: | Undecided → Medium |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in linux (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in linux (Ubuntu Zesty): | |
status: | New → In Progress |
no longer affects: | linux (Ubuntu Zesty) |
tags: | added: sts |
tags: | added: patch |
Changed in linux (Ubuntu Xenial): | |
status: | Fix Committed → Won't Fix |
An upstream fix is found upstream preventing the warning in ethtool code
* Reference : /patchwork. ozlabs. org/patch/ 722971/
https:/
* Commit : /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=3808d348381 84fd29088d6b3a3 64ba2f1c018fb6
https:/
-- ethtool. c b/net/core/ ethtool. c ethtool. c ethtool. c get_regs( struct net_device *dev, char __user *useraddr)
regs. len = reglen;
diff --git a/net/core/
index 236a21e..d92de0a 100644
--- a/net/core/
+++ b/net/core/
@@ -1405,9 +1405,12 @@ static int ethtool_
if (regs.len > reglen)
- regbuf = vzalloc(reglen);
- if (reglen && !regbuf)
- return -ENOMEM;
+ regbuf = NULL;
+ if (reglen) {
+ regbuf = vzalloc(reglen);
+ if (!regbuf)
+ return -ENOMEM;
+ }
--