Skip to contentSkip to conversation

net: clear heap allocation for ethtool_get_regs()

PATCH Applied Eugene Teo 4 participants 5 messages Jan 25, 2011 Networking

lore
Share & tools
lore

Eugene Teo

author
#0 lore raw

There is a conflict between commit b00916b1 and a77f5db3. This patch resolves the conflict by clearing the heap allocation in ethtool_get_regs().

net/core/ethtool.c +1 -1
index 1774178..ff23029 100644
@@ -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;
 
maintainer
#2 lore raw

From: David Miller <[email protected]>
Date: Mon, 24 Jan 2011 21:05:43 -0800 (PST)

Quoted 10 lines

From: Eugene Teo <[email protected]>
Date: Tue, 25 Jan 2011 12:49:10 +0800

Quoted 5 lines

There is a conflict between commit b00916b1 and a77f5db3. This patch resolves the conflict by clearing the heap allocation in ethtool_get_regs().

Applied, thanks Eugene.

Ugh, I just noticed, Eugene could you please always CC: netdev on networking patches? Thanks.

#3 lore raw
Quoted 9 lines · David Miller

From: David Miller <[email protected]>
Date: Mon, 24 Jan 2011 21:05:43 -0800 (PST)

Quoted 6 lines

From: Eugene Teo <[email protected]>
Date: Tue, 25 Jan 2011 12:49:10 +0800

Quoted 3 lines

There is a conflict between commit b00916b1 and a77f5db3. This patch resolves the conflict by clearing the heap allocation in ethtool_get_regs().

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Applied, thanks Eugene.

Ugh, I just noticed, Eugene could you please always CC: netdev on networking patches?  Thanks.

Will do that. Thanks Dave.

Eugene

#4 lore raw
In reply to Eugene Teo

Hi Eugene,

Quoted 2 lines · Eugene Teo

There is a conflict between commit b00916b1 and a77f5db3. This patch resolves the conflict by clearing the heap allocation in ethtool_get_regs().

Good catch! Thanks!

-Kees

Signature · 2 lines
Kees Cook
Ubuntu Security Team