]> 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)
commit2ab576b702eb7302af2be7f526d8baddb9eff303
treefdd1878bc976f9d0172c13e822070cc1aa80efe0
parent79a1d043993237782319a83727f76d1803515453
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