On Thu, Jan 22, 2015 at 05:54:10AM -0800, Anshul Garg wrote:
> -             if ((long long)(-tmp) >= 0)
> -                     return -ERANGE;
> -             *res = -tmp;
...
> +     if ((long long)tmp < 0)
> +             return -ERANGE;
> +     *res = sign * tmp;

I don't believe overflow handling is correct anymore with this patch.
Did you try with the input as the most negative possible unsigned long?

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

Reply via email to