]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4_en: Fix out of bounds array access
authorEli Cohen <eli@dev.mellanox.co.il>
Mon, 25 Oct 2010 02:56:47 +0000 (02:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2010 19:14:11 +0000 (12:14 -0700)
commita8676876e5fd2f3fc616da827130426ab7c626ec
tree751135348a369dcdf85100b2cc7c7f8aefb508da
parentbfa31760b0915fc75773074ac4f604fe710a81db
mlx4_en: Fix out of bounds array access

When searching for a free entry in either mlx4_register_vlan() or
mlx4_register_mac(), and there is no free entry, the loop terminates without
updating the local variable free thus causing out of array bounds access. Fix
this by adding a proper check outside the loop.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/port.c