Messages in this thread Patch in this message | | | Date | Fri, 4 Nov 2011 22:36:14 +0300 | From | Dan Carpenter <> | Subject | Re: [050/107] block: check for proper length of iov entries earlier in blk_rq_map_user_iov() |
| |
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
[unhandled content-type:application/pgp-signature] | |