]> git.baikalelectronics.ru Git - kernel.git/commit
fm10k: Validate VLAN ID in fm10k_update_xc_addr_pf
authorMatthew Vick <matthew.vick@intel.com>
Tue, 27 Jan 2015 02:33:26 +0000 (02:33 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 6 Feb 2015 03:41:50 +0000 (19:41 -0800)
commitcb503f8969d1af058b54ca5e2a009a1e01819665
treefdd1878bc976f9d0172c13e822070cc1aa80efe0
parenta081d8ae1f19df6257a413a71b790cd46982816a
fm10k: Validate VLAN ID in fm10k_update_xc_addr_pf

Currently, fm10k_update_xc_addr_pf has an issue where it does not
properly drop the upper-most four bits of the VLAN ID due to type
promotion. Resolve the issue not by masking off the bits, but by
throwing an error if the VLAN ID is out-of-bounds.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_pf.c