]> git.baikalelectronics.ru Git - kernel.git/commit
ice: add extra check for null Rx descriptor
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 12 Dec 2019 11:13:05 +0000 (03:13 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 4 Jan 2020 00:08:33 +0000 (16:08 -0800)
commitdc60d761bbf6fe9ace8d816078e2bc9fbed3a91a
tree35d10fb94a9e64f84d782bff09cd590cdb9f0d27
parent56d1d8d59fcf4067876d2563f2ec3ca819ceb5a1
ice: add extra check for null Rx descriptor

In the case where the hardware gives us a null Rx descriptor, it is
theoretically possible that we could call one of our skb-construction
functions with no data pointer, which would cause a panic.

In real life, this will never happen - we only get null RX
descriptors as the final descriptor in a chain of otherwise-valid
descriptors. When this happens, the skb will be extant and we'll just
call ice_add_rx_frag(), which can deal with empty data buffers.

Unfortunately, Coverity does not have intimate knowledge of our
hardware, so we must add a check here.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c