Re: [PATCH] net: thunderx: correct bound check in nic_config_loopback
From: Sunil Kovvuri <hidden>
Date: 2016-07-31 16:41:55
Also in:
linux-arm-kernel, lkml
From: Sunil Kovvuri <hidden>
Date: 2016-07-31 16:41:55
Also in:
linux-arm-kernel, lkml
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.