[Intel-wired-lan] [bug report] ixgbe: added Rx/Tx ring disable/enable functions

Björn Töpel bjorn.topel at gmail.com
Fri Oct 12 08:41:02 UTC 2018


Den tors 11 okt. 2018 kl 13:48 skrev Dan Carpenter <dan.carpenter at oracle.com>:
>
> Hello Björn Töpel,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 024aa5800f32: "ixgbe: added Rx/Tx ring disable/enable
> functions" from Oct 2, 2018, leads to the following Smatch complaint:
>
>     drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:10520 ixgbe_txrx_ring_enable()
>     error: we previously assumed 'xdp_ring' could be null (see line 10515)
>
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>  10514          ixgbe_configure_tx_ring(adapter, tx_ring);
>  10515          if (xdp_ring)
>                     ^^^^^^^^
> The patch adds a check for NULL.
>
>  10516                  ixgbe_configure_tx_ring(adapter, xdp_ring);
>  10517          ixgbe_configure_rx_ring(adapter, rx_ring);
>  10518
>  10519          clear_bit(__IXGBE_TX_DISABLED, &tx_ring->state);
>  10520          clear_bit(__IXGBE_TX_DISABLED, &xdp_ring->state);
>                                                 ^^^^^^^^^^^^^^^
> but it also adds an unchecked dereference.
>
>  10521  }
>  10522
>
> regards,
> dan carpenter

Thank you. I'll have a look and get back with a patch.


Björn


> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan


More information about the Intel-wired-lan mailing list