ice: protect ring accesses with WRITE_ONCE
authorCiara Loftus <ciara.loftus@intel.com>
Tue, 9 Jun 2020 13:19:45 +0000 (13:19 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 19 Jun 2020 05:35:34 +0000 (22:35 -0700)
commitb1d95cc2391ffac0c5b27256a4fb0d2cfb021a29
treedaba3edf8a8be9f2f85ae07209ecb033e8295882
parentd59e267912cd90b0adf33b4659050d831e746317
ice: protect ring accesses with WRITE_ONCE

The READ_ONCE macro is used when reading rings prior to accessing the
statistics pointer. The corresponding WRITE_ONCE usage when allocating and
freeing the rings to ensure protected access was not in place. Introduce
this.

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/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_main.c