An upstream fix is found upstream preventing the warning in ethtool code * Reference : https://patchwork.ozlabs.org/patch/722971/
* Commit : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3808d34838184fd29088d6b3a364ba2f1c018fb6 -- diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 236a21e..d92de0a 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -1405,9 +1405,12 @@ static int ethtool_get_regs(struct net_device *dev, char __user *useraddr) if (regs.len > reglen) regs.len = reglen; - regbuf = vzalloc(reglen); - if (reglen && !regbuf) - return -ENOMEM; + regbuf = NULL; + if (reglen) { + regbuf = vzalloc(reglen); + if (!regbuf) + return -ENOMEM; + } ops->get_regs(dev, ®s, regbuf); -- ** Description changed: - # Kernel stack trace + If ->get_regs_len() callback return 0, we allocate 0 bytes of memory, + what print the following warning in kern.log : + [153343.277776] vmalloc: allocation failure: 0 bytes [153343.277784] ethtool: page allocation failure: order:0, mode:0x24080c2 [153343.277787] CPU: 21 PID: 7668 Comm: ethtool Tainted: G 4.4.0-62-generic #83-Ubuntu [153343.277789] Hardware name: [153343.277791] 0000000000000286 000000005949f325 ffff8801fddcfba8 ffffffff813f7c63 [153343.277795] 00000000024080c2 ffffffff81ccfe30 ffff8801fddcfc38 ffffffff8119498a [153343.277797] ffffffff81ccfe30 ffff8801fddcfbc8 0000000000000018 ffff8801fddcfc48 [153343.277800] Call Trace: [153343.277809] [<ffffffff813f7c63>] dump_stack+0x63/0x90 [153343.277815] [<ffffffff8119498a>] warn_alloc_failed+0xfa/0x150 [153343.277823] [<ffffffff811d1082>] __vmalloc_node_range+0x202/0x290 [153343.277829] [<ffffffff8183812e>] ? _raw_spin_unlock_bh+0x1e/0x20 [153343.277831] [<ffffffff811d1214>] vzalloc+0x54/0x60 [153343.277836] [<ffffffff81733c57>] ? dev_ethtool+0xfc7/0x1ef0 [153343.277838] [<ffffffff81733c57>] dev_ethtool+0xfc7/0x1ef0 [153343.277842] [<ffffffff81746362>] dev_ioctl+0x182/0x580 [153343.277847] [<ffffffff8170d4a2>] sock_do_ioctl+0x42/0x50 [153343.277849] [<ffffffff8170d9a2>] sock_ioctl+0x1d2/0x290 [153343.277853] [<ffffffff812227af>] do_vfs_ioctl+0x29f/0x490 [153343.277858] [<ffffffff8106b514>] ? __do_page_fault+0x1b4/0x400 [153343.277860] [<ffffffff81222a19>] SyS_ioctl+0x79/0x90 [153343.277863] [<ffffffff818385f2>] entry_SYSCALL_64_fastpath+0x16/0x71 ** Description changed: If ->get_regs_len() callback return 0, we allocate 0 bytes of memory, what print the following warning in kern.log : - - [153343.277776] vmalloc: allocation failure: 0 bytes - [153343.277784] ethtool: page allocation failure: order:0, mode:0x24080c2 - [153343.277787] CPU: 21 PID: 7668 Comm: ethtool Tainted: G 4.4.0-62-generic #83-Ubuntu - [153343.277789] Hardware name: - [153343.277791] 0000000000000286 000000005949f325 ffff8801fddcfba8 ffffffff813f7c63 - [153343.277795] 00000000024080c2 ffffffff81ccfe30 ffff8801fddcfc38 ffffffff8119498a - [153343.277797] ffffffff81ccfe30 ffff8801fddcfbc8 0000000000000018 ffff8801fddcfc48 - [153343.277800] Call Trace: - [153343.277809] [<ffffffff813f7c63>] dump_stack+0x63/0x90 - [153343.277815] [<ffffffff8119498a>] warn_alloc_failed+0xfa/0x150 - [153343.277823] [<ffffffff811d1082>] __vmalloc_node_range+0x202/0x290 - [153343.277829] [<ffffffff8183812e>] ? _raw_spin_unlock_bh+0x1e/0x20 - [153343.277831] [<ffffffff811d1214>] vzalloc+0x54/0x60 - [153343.277836] [<ffffffff81733c57>] ? dev_ethtool+0xfc7/0x1ef0 - [153343.277838] [<ffffffff81733c57>] dev_ethtool+0xfc7/0x1ef0 - [153343.277842] [<ffffffff81746362>] dev_ioctl+0x182/0x580 - [153343.277847] [<ffffffff8170d4a2>] sock_do_ioctl+0x42/0x50 - [153343.277849] [<ffffffff8170d9a2>] sock_ioctl+0x1d2/0x290 - [153343.277853] [<ffffffff812227af>] do_vfs_ioctl+0x29f/0x490 - [153343.277858] [<ffffffff8106b514>] ? __do_page_fault+0x1b4/0x400 - [153343.277860] [<ffffffff81222a19>] SyS_ioctl+0x79/0x90 - [153343.277863] [<ffffffff818385f2>] entry_SYSCALL_64_fastpath+0x16/0x71 + 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:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + 0000000000000286 000000005949f325 ffff8801fddcfba8 ffffffff813f7c63 + 00000000024080c2 ffffffff81ccfe30 ffff8801fddcfc38 ffffffff8119498a + ffffffff81ccfe30 ffff8801fddcfbc8 0000000000000018 ffff8801fddcfc48 + Call Trace: + [<ffffffff813f7c63>] dump_stack+0x63/0x90 + [<ffffffff8119498a>] warn_alloc_failed+0xfa/0x150 + [<ffffffff811d1082>] __vmalloc_node_range+0x202/0x290 + [<ffffffff8183812e>] ? _raw_spin_unlock_bh+0x1e/0x20 + [<ffffffff811d1214>] vzalloc+0x54/0x60 + [<ffffffff81733c57>] ? dev_ethtool+0xfc7/0x1ef0 + [<ffffffff81733c57>] dev_ethtool+0xfc7/0x1ef0 + [<ffffffff81746362>] dev_ioctl+0x182/0x580 + [<ffffffff8170d4a2>] sock_do_ioctl+0x42/0x50 + [<ffffffff8170d9a2>] sock_ioctl+0x1d2/0x290 + [<ffffffff812227af>] do_vfs_ioctl+0x29f/0x490 + [<ffffffff8106b514>] ? __do_page_fault+0x1b4/0x400 + [<ffffffff81222a19>] SyS_ioctl+0x79/0x90 + [<ffffffff818385f2>] entry_SYSCALL_64_fastpath+0x16/0x71 ** Summary changed: - ethtool vmalloc: allocation failure: 0 bytes WARNING + ethtool - vmalloc: allocation failure: 0 bytes message ** Summary changed: - ethtool - vmalloc: allocation failure: 0 bytes message + ethtool - "vmalloc: allocation failure: 0 bytes" message -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1703944 Title: ethtool - "vmalloc: allocation failure: 0 bytes" message Status in linux package in Ubuntu: Incomplete Status in linux source package in Xenial: New 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:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0000000000000286 000000005949f325 ffff8801fddcfba8 ffffffff813f7c63 00000000024080c2 ffffffff81ccfe30 ffff8801fddcfc38 ffffffff8119498a ffffffff81ccfe30 ffff8801fddcfbc8 0000000000000018 ffff8801fddcfc48 Call Trace: [<ffffffff813f7c63>] dump_stack+0x63/0x90 [<ffffffff8119498a>] warn_alloc_failed+0xfa/0x150 [<ffffffff811d1082>] __vmalloc_node_range+0x202/0x290 [<ffffffff8183812e>] ? _raw_spin_unlock_bh+0x1e/0x20 [<ffffffff811d1214>] vzalloc+0x54/0x60 [<ffffffff81733c57>] ? dev_ethtool+0xfc7/0x1ef0 [<ffffffff81733c57>] dev_ethtool+0xfc7/0x1ef0 [<ffffffff81746362>] dev_ioctl+0x182/0x580 [<ffffffff8170d4a2>] sock_do_ioctl+0x42/0x50 [<ffffffff8170d9a2>] sock_ioctl+0x1d2/0x290 [<ffffffff812227af>] do_vfs_ioctl+0x29f/0x490 [<ffffffff8106b514>] ? __do_page_fault+0x1b4/0x400 [<ffffffff81222a19>] SyS_ioctl+0x79/0x90 [<ffffffff818385f2>] entry_SYSCALL_64_fastpath+0x16/0x71 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1703944/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp