Re: [PATCH] net: thunderx: correct bound check in nic_config_loopback

From: Sunil Kovvuri
Date: Sun Jul 31 2016 - 12:42:14 EST


Thanks for finding.
A much better fix would be,

- if (lbk->vf_id > MAX_LMAC)
+ if (lbk->vf_id >= nic->num_vf_en)
return -1;

where 'num_vf_en' reflects the exact number of physical interfaces or
LMACs on the system.

Thanks,
Sunil.