From: Alexei Starovoitov <a...@fb.com>
Date: Sat, 28 Jan 2017 17:17:05 -0800

> under memory pressure 'ethtool -S' command may warn:
> [ 2374.385195] ethtool: page allocation failure: order:4, mode:0x242c0c0
 ...
> ~1160 mlx5 counters ~= order 4 allocation which is unlikely to succeed
> under memory pressure.  Since 'get stats' command is not critical
> avoid reclaim and warning.
> Also convert to safer kmalloc_array.
> 
> Signed-off-by: Alexei Starovoitov <a...@kernel.org>

Let's just fix this right, just like in ethtool_get_regs().

Just use vzalloc() unconditionally.  It is an entirely similar
situation.  But please be careful with the size calculations when
you make this adjustment.

Thank you.

Reply via email to