lkml.org 
[lkml]   [2019]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectre: net: ll_temac: Cleanup multicast filter on change
Date
Hi,

static analysis with Coverity has detected a potential issue with the
following commit:

commit 1b3fa5cf859bce7094ac18d32f54af8a7148ad51
Author: Esben Haabendal <esben@geanix.com>
Date: Thu May 23 14:02:21 2019 +0200

net: ll_temac: Cleanup multicast filter on change

In function temac_set_multicast_list
(drivers/net/ethernet/xilinx/ll_temac_main.c), loop counter i is *only*
initialized in the code block:

if (!netdev_mc_empty(ndev)) {
...
}

Following this if code block there is a while-loop that iterates using i
as counter which will be problematic if i has not been correctly
initialized:

while (i < MULTICAST_CAM_TABLE_NUM) {
temac_indirect_out32_locked(lp, XTE_MAW0_OFFSET, 0);
temac_indirect_out32_locked(lp, XTE_MAW1_OFFSET, i << 16);
i++;
}

Colin

\
 
 \ /
  Last update: 2019-05-25 00:42    [W:0.089 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site