Re: [050/107] block: check for proper length of iov entries earlierin blk_rq_map_user_iov()

From: Dan Carpenter
Date: Fri Nov 04 2011 - 15:36:07 EST


On Fri, Nov 04, 2011 at 03:24:16PM +0000, Ben Hutchings wrote:
> > --- a/block/blk-map.c
> > +++ b/block/blk-map.c
> > @@ -201,12 +201,13 @@ int blk_rq_map_user_iov(struct request_q
> > for (i = 0; i < iov_count; i++) {
> > unsigned long uaddr = (unsigned long)iov[i].iov_base;
> >
> > + if (!iov[i].iov_len)
> > + return -EINVAL;
> > +
> > if (uaddr & queue_dma_alignment(q)) {
> > unaligned = 1;
> > break;
>
> I think the correct fix is just to remove the 'break'.
>

Yeah. I think you're right. Are you going to send the patch?

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature