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)
commit33a44c2873ba64c54d11a9364b6b43271761d245
treefdd1878bc976f9d0172c13e822070cc1aa80efe0
parent2ca292d968ef20cb04f31192d1f626bd8d782960
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