On Thu, Aug 09, 2012 at 02:33:12PM +0530, Amit Shah wrote:
> > @@ -807,9 +807,31 @@ static int pipe_to_sg(struct pipe_inode_info *pipe, 
> > struct pipe_buffer *buf,
> >  
> >             len = min(buf->len, sd->len);
> >             sg_set_page(&(sgl->sg[sgl->n]), buf->page, len, buf->offset);
> > -           sgl->n++;
> > -           sgl->len += len;
> > +   } else {
> > +           /* Failback to copying a page */
> > +           struct page *page = alloc_page(GFP_KERNEL);
> 
> I prefer zeroing out the page.  If there's not enough data to be
> filled in the page, the remaining data can be leaked to the host.

get_zeroed_page()?

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

Reply via email to