From: Vishal Kulkarni <vis...@chelsio.com> Date: Tue, 1 Oct 2019 04:07:57 +0530
> 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: 94cdb8bb993a ("cxgb4: Add support for dynamic allocation of > resources for ULD") Please do not split Fixes: tags onto multiple lines. > Signed-off-by: Shahjada Abul Husain <shahj...@chelsio.com> > Signed-off-by: Vishal Kulkarni <vis...@chelsio.com> This patch adds a new warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c: In function ‘cxgb4_register_uld’: drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:179:26: warning: ‘bmap_idx’ may be used uninitialized in this function [-Wmaybe-uninitialized] rxq_info->msix_tbl[i] = bmap_idx; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:141:14: note: ‘bmap_idx’ was declared here int i, err, bmap_idx, msi_idx, que_idx = 0; ^~~~~~~~