Yes, it's incorrect at other places as well.
That went in the very early stages of development and didn't change it because
that out of bounds issue will never happen as no of logical interfaces
will never be
morethan MAX_LMAC i.e 8, so max vf_id will be 7.
But with addition of support for newer
On 07/31/2016 12:41 PM, Sunil Kovvuri wrote:
> 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
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.
Hello.
On 7/31/2016 5:49 AM, Levin, Alexander wrote:
Off by one in nic_config_loopback would access an invalid arrat variable when
Array?
vf id == MAX_LMAC.
Signed-off-by: Sasha Levin
[...]
MBR, Sergei
Off by one in nic_config_loopback would access an invalid arrat variable when
vf id == MAX_LMAC.
Signed-off-by: Sasha Levin
---
drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c
b/dri