]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: protect ring accesses with READ- and WRITE_ONCE
authorCiara Loftus <ciara.loftus@intel.com>
Tue, 9 Jun 2020 13:19:43 +0000 (13:19 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 19 Jun 2020 05:30:04 +0000 (22:30 -0700)
commit4362b59b75d3bbb3ac0e97d2ac96bb1578276c57
treef44c113db08ef954f7a0fa52b94a172fb9fbdf3c
parentdb0ed9fc3ef582b34f0bb903839f3b877b693b50
ixgbe: 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/ixgbe/ixgbe_lib.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c