]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4:Fix out-of-bounds MSI-X info array access
authorVishal Kulkarni <vishal@chelsio.com>
Thu, 3 Oct 2019 22:36:15 +0000 (04:06 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Oct 2019 21:42:13 +0000 (14:42 -0700)
commitcb5781fdb753e616a43e46cc8213b5b82895d64e
treedbab97c9cace62bcb9f3597e1ce6984f35d49d0b
parent188f1db9e6ffa850ac4ba22cc35bfb5017b261bd
cxgb4:Fix out-of-bounds MSI-X info array access

When fetching free MSI-X vectors for ULDs, check for the error code
before accessing MSI-X info array. Otherwise, an out-of-bounds access is
attempted, which results in kernel panic.

Fixes: 781edc2e4515 ("cxgb4: Add support for dynamic allocation of resources for ULD")
Signed-off-by: Shahjada Abul Husain <shahjada@chelsio.com>
Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c