Commit 5b33c4a2 authored by Eugene Teo's avatar Eugene Teo Committed by Greg Kroah-Hartman

net: clear heap allocation for ethtool_get_regs()

commit b7c7d01a upstream.

There is a conflict between commit b00916b1 and a77f5db3. This patch resolves
the conflict by clearing the heap allocation in ethtool_get_regs().
Signed-off-by: default avatarEugene Teo <eugeneteo@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3e3742bc
......@@ -817,7 +817,7 @@ static int ethtool_get_regs(struct net_device *dev, char __user *useraddr)
if (regs.len > reglen)
regs.len = reglen;
regbuf = vmalloc(reglen);
regbuf = vzalloc(reglen);
if (!regbuf)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment