]> git.baikalelectronics.ru Git - kernel.git/commit
igbvf: integer wrapping bug setting the mtu
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Sep 2013 20:44:20 +0000 (20:44 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 24 Oct 2013 12:03:06 +0000 (05:03 -0700)
commit46bf39422a5bc513c5beae518f9111a16692ae6e
tree32951a92eca4657f05f75600f4fd9f28b1f4c2f2
parentce341bbe0006ee948736334b0a92ad76b32c6de7
igbvf: integer wrapping bug setting the mtu

If new_mtu is very large then "new_mtu + ETH_HLEN + ETH_FCS_LEN" can
wrap and the check on the next line can underflow. This is one of those
bugs which can be triggered by the user if you have namespaces
configured.

Also since this is something the user can trigger then we don't want to
have dev_err() message.

This is a static checker fix and I'm not sure what the impact is.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Tested-by: Sibai Li Sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igbvf/netdev.c