]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:41:11 +0000 (16:41 -0700)
commitf1ba545f0b1184417caf1d805891b1abda8d247a
tree7500520b2606f1a5ec541456e3a2c85cd2389e01
parentbd77f4d2b842b0f25495bf2a78c0fa653976eb8e
ixgbe: Correct length check for round up

Orabug: 23177316

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>
(cherry picked from commit 73457165d71d5ce0e41c0adb7bfa484702c36248)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c