]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Correct length check for round up
authorMark Rustad <mark.d.rustad@intel.com>
Mon, 14 Mar 2016 18:05:51 +0000 (11:05 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 7 Apr 2016 22:30:16 +0000 (15:30 -0700)
commit85ac41fe238f3a19b4e7439ee43bf79954f7049a
tree8ba0d1332c62ad23dd21d6ba150107d3e7f90031
parent5d9ef05476c3c307c57e0f3a89db3cc03e8f2616
ixgbe: Correct length check for round up

The function ixgbe_host_interface_command actually uses a multiple
of word sized buffer to do its business, but only checks against
the actual length passed in. This means that on read operations it
could be possible to modify locations beyond the length passed in.
Change the check to round up in the same way, just to avoid any
possible hazard.

Signed-off-by: Mark Rustad <mark.d.rustad@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_common.c