From: Alexei Starovoitov <a...@fb.com> Date: Mon, 30 Jan 2017 18:25:18 -0800
> under memory pressure 'ethtool -S' command may warn: ... > ~1160 mlx5 counters ~= order 4 allocation which is unlikely to succeed > under memory pressure. Convert them to vzalloc() as ethtool_get_regs() does. > Also take care of drivers without counters similar to > commit 67ae7cf1eeda ("ethtool: Allow zero-length register dumps again") > and reduce warn_on to warn_on_once. > > Signed-off-by: Alexei Starovoitov <a...@kernel.org> > --- > Dave, I think by 'careful about size calculations' you mean > to take care of zero-length. Please let me know if I misunderstood. I was talking about the transformation from "count, size" to "count * size" when going from kcalloc() to vzalloc() which you did properly. Applied, thank you :)