lkml.org 
[lkml]   [2011]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [74/74] net: fix rds_iovec page count overflow
On Wed, Apr 13, 2011 at 8:51 AM, Greg KH <gregkh@suse.de> wrote:
> +
> +               /*
> +                * nr_pages for one entry is limited to (UINT_MAX>>PAGE_SHIFT)+1,
> +                * so tot_pages cannot overflow without first going negative.
> +                */
> +               if ((int)nr_pages < 0)
> +                       ret = -EINVAL;
> +                       goto out;
>        }

Yeah, what the heck happened there. That won't work.

As Paul says, the original was just a "return -EINVAL", and when the
backport changed it into a "ret = " + "goto out", it really needs a
couple of braces.

As it is, the patch is just broken. Think about it.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-04-15 19:13    [W:0.295 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site