]> git.karo-electronics.de Git - karo-tx-linux.git/commit
i40e: potential array underflow in i40e_vc_process_vf_msg()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 15 Jan 2014 06:43:39 +0000 (06:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:18 +0000 (10:28 -0700)
commit8a255ad5da168d12278f6a59bb2727ca07416c9d
treeba4750db86f90508d91b71f9628dee4c371d3c6f
parentcd3750a8e7a512616c64c729a8de4d4d0bd69b7e
i40e: potential array underflow in i40e_vc_process_vf_msg()

commit c243e96335c56e56dcf6a00593104554fb06b689 upstream.

If "vf_id" is smaller than hw->func_caps.vf_base_id then it leads to
an array underflow of the pf->vf[] array.  This is unlikely to happen
unless the hardware is bad, but it's a small change and it silences a
static checker warning.

Fixes: 7efa84b7abc1 ('i40e: support VFs on PFs other than 0')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c