Subject: Re: [patch v3] fix stack overflow in pktgen_if_write()

From: Nelson Elhage <[email-masked]>
Date: Thu, 28 Oct 2010 12:30:32 -0400

On Thu, Oct 28, 2010 at 06:28:25PM +0200, Dan Carpenter wrote:
> On Thu, Oct 28, 2010 at 11:22:22AM -0400, Nelson Elhage wrote:
> > You've got a leak if copy_user fails.
> > 
> 
> My QC scripts should have caught that, but they didn't...  I'll figure
> it out.  It shouldn't happen again.
> 
> > While testing this, I realized that printk() won't print more than 1k in a
> > single call, anyways, so I've sent along a patch that just copies up to 1k onto
> > the stack, which should prevent the overflow without changing behavior or
> > needing a heap allocation.
> > 
> 
> Ok.  Good to hear.  Sorry I wasted people's time.

No worries. I appreciate you jumping in to help, even if it looks like the
approach wasn't needed in the end.

- Nelson

> regards,
> dan carpenter