lkml.org 
[lkml]   [2011]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2011-11-04 20:39    [W:1.110 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site