Skip to content

Commit b7c7d01

Browse files
eugeneteodavem330
authored andcommitted
net: clear heap allocation for ethtool_get_regs()
There is a conflict between commit b00916b and a77f5db. This patch resolves the conflict by clearing the heap allocation in ethtool_get_regs(). Cc: stable@kernel.org Signed-off-by: Eugene Teo <eugeneteo@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d80bc0f commit b7c7d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ static int ethtool_get_regs(struct net_device *dev, char __user *useraddr)
817817
if (regs.len > reglen)
818818
regs.len = reglen;
819819

820-
regbuf = vmalloc(reglen);
820+
regbuf = vzalloc(reglen);
821821
if (!regbuf)
822822
return -ENOMEM;
823823

0 commit comments

Comments
 (0)