ixgbe: added Rx/Tx ring disable/enable functions
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
Den tors 11 okt. 2018 kl 13:48 skrev Dan Carpenter <[email protected]>:
Quoted 23 lines
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:10520ixgbe_txrx_ring_enable()
error: we previously assumed 'xdp_ring' could be null (see line 10515)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
10514ixgbe_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);
10517ixgbe_configure_rx_ring(adapter, rx_ring);
10518
10519clear_bit(__IXGBE_TX_DISABLED, &tx_ring->state);10520 clear_bit(__IXGBE_TX_DISABLED, &xdp_ring->state); ^^^^^^^^^^^^^^^
Quoted 7 lines
but it also adds an unchecked dereference.
10521 }
10522regards,
dan carpenter
Thank you. I'll have a look and get back with a patch.
Bj?rn
Quoted 4 lines
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan