linux-kernel.vger.kernel.org archive mirror
 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 related	[flat|nested] 5+ messages in thread

* Re: net: clear heap allocation for ethtool_get_regs()
  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 17:14 ` Kees Cook
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2011-01-25  5:05 UTC (permalink / raw)
  To: eugeneteo; +Cc: linux-kernel, kees.cook, bhutchings

From: Eugene Teo <eugeneteo@kernel.org>
Date: Tue, 25 Jan 2011 12:49:10 +0800

> 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>

Applied, thanks Eugene.

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

* Re: net: clear heap allocation for ethtool_get_regs()
  2011-01-25  5:05 ` David Miller
@ 2011-01-25  5:06   ` David Miller
  2011-01-25  5:07     ` Eugene Teo
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-01-25  5:06 UTC (permalink / raw)
  To: eugeneteo; +Cc: linux-kernel, kees.cook, bhutchings

From: David Miller <davem@davemloft.net>
Date: Mon, 24 Jan 2011 21:05:43 -0800 (PST)

> From: Eugene Teo <eugeneteo@kernel.org>
> Date: Tue, 25 Jan 2011 12:49:10 +0800
> 
>> 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>
> 
> Applied, thanks Eugene.

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

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

* Re: net: clear heap allocation for ethtool_get_regs()
  2011-01-25  5:06   ` David Miller
@ 2011-01-25  5:07     ` Eugene Teo
  0 siblings, 0 replies; 5+ messages in thread
From: Eugene Teo @ 2011-01-25  5:07 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, kees.cook, bhutchings

On Tue, Jan 25, 2011 at 1:06 PM, David Miller <davem@davemloft.net> wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 24 Jan 2011 21:05:43 -0800 (PST)
>
>> From: Eugene Teo <eugeneteo@kernel.org>
>> Date: Tue, 25 Jan 2011 12:49:10 +0800
>>
>>> 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>
>>
>> Applied, thanks Eugene.
>
> Ugh, I just noticed, Eugene could you please always CC: netdev on
> networking patches?  Thanks.

Will do that. Thanks Dave.

Eugene

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

* Re: net: clear heap allocation for ethtool_get_regs()
  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 17:14 ` Kees Cook
  1 sibling, 0 replies; 5+ messages in thread
From: Kees Cook @ 2011-01-25 17:14 UTC (permalink / raw)
  To: Eugene Teo; +Cc: linux-kernel, David S. Miller, Ben Hutchings

Hi Eugene,

On Tue, Jan 25, 2011 at 12:49:10PM +0800, Eugene Teo wrote:
> 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

-- 
Kees Cook
Ubuntu Security Team

^ 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;
as well as URLs for NNTP newsgroup(s).