]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: protect ring accesses with READ- and WRITE_ONCE
authorCiara Loftus <ciara.loftus@intel.com>
Tue, 9 Jun 2020 13:19:44 +0000 (13:19 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 19 Jun 2020 05:31:21 +0000 (22:31 -0700)
commitad04934895cc6f46e2737239afe4658238d2960a
tree0fb3ec9db137101e6f734174f976c4b2d01ba90f
parentc6a262d3d127a34a4cd43619dd98249cae5319c4
i40e: protect ring accesses with READ- and WRITE_ONCE

READ_ONCE should be used when reading rings prior to accessing the
statistics pointer. Introduce this as well as the corresponding WRITE_ONCE
usage when allocating and freeing the rings, to ensure protected access.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c