mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* net: clear heap allocation for ethtool_get_regs()
@ 2011-01-25  4:49 Eugene Teo
  2011-01-25  5:05 ` David Miller
  2011-01-25 17:14 ` Kees Cook
  0 siblings, 2 replies; 5+ messages in thread
From: Eugene Teo @ 2011-01-25  4:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, Kees Cook, Ben Hutchings

There is a conflict between commit b00916b1 and a77f5db3. 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>

diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 1774178..ff23029 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -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;
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-25 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25  4:49 net: clear heap allocation for ethtool_get_regs() Eugene Teo
2011-01-25  5:05 ` David Miller
2011-01-25  5:06   ` David Miller
2011-01-25  5:07     ` Eugene Teo
2011-01-25 17:14 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®