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

Sunil Kovvuri sunil.kovvuri at gmail.com
Sun Jul 31 09:41:52 PDT 2016


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.



More information about the linux-arm-kernel mailing list