Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 2, 2017 at 5:58 PM, Colin King <colin.king@xxxxxxxxxxxxx> wrote:
> The current comparison of entry < 0 will never be true since entry is an
> unsigned integer. Cast entry to an int to ensure -ve error return values
> from the call to jumbo_frm are correctly being caught.

>         if (unlikely(is_jumbo) && likely(priv->synopsys_id <
>                                          DWMAC_CORE_4_00)) {
>                 entry = priv->hw->mode->jumbo_frm(tx_q, skb, csum_insertion);
> -               if (unlikely(entry < 0))
> +               if (unlikely((int)entry < 0))

It feels like a hiding some other issue.

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux