Re: [linux-next:master] BUILD REGRESSION 89bf6e28373beef9577fa71f996a5f73a569617c
On 10/25/2022 3:41 PM, Jakub Kicinski wrote: On Wed, 26 Oct 2022 01:17:48 +0800 kernel test robot wrote: drivers/net/ethernet/broadcom/genet/bcmgenet.c:1497:5-13: ERROR: invalid reference to the index variable of the iterator on line 1475 CC Doug Thanks for highlighting this for me, but I happened to catch it from the linux-mm list and was just looking into it. It looks to me like a false positive since I am initializing the loc_rule variable in all paths outside of the list_for_each_entry() loop prior to its use on line 1497. If desired I can submit a new patch to make coccinelle happy. -Doug
Re: [linux-next:master] BUILD REGRESSION 89bf6e28373beef9577fa71f996a5f73a569617c
On Tue, 25 Oct 2022 16:04:15 -0700 Doug Berger wrote: > > On Wed, 26 Oct 2022 01:17:48 +0800 kernel test robot wrote: > >> drivers/net/ethernet/broadcom/genet/bcmgenet.c:1497:5-13: ERROR: invalid > >> reference to the index variable of the iterator on line 1475 > > > > CC Doug > Thanks for highlighting this for me, but I happened to catch it from the > linux-mm list and was just looking into it. > > It looks to me like a false positive since I am initializing the > loc_rule variable in all paths outside of the list_for_each_entry() loop > prior to its use on line 1497. Ack, indeed the code looks right. Thanks for investigating. > If desired I can submit a new patch to make coccinelle happy. I wonder if Cocci can detect writes. Let me add Julia for visibility. If not we can use a different variable for the "check if already exists" iteration? It could make the code easier to follow, IMHO. Or leave it be.
Re: [linux-next:master] BUILD REGRESSION 89bf6e28373beef9577fa71f996a5f73a569617c
On Wed, 26 Oct 2022 01:17:48 +0800 kernel test robot wrote: > drivers/net/ethernet/broadcom/genet/bcmgenet.c:1497:5-13: ERROR: invalid > reference to the index variable of the iterator on line 1475 CC Doug
[linux-next:master] BUILD REGRESSION 89bf6e28373beef9577fa71f996a5f73a569617c
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 89bf6e28373beef9577fa71f996a5f73a569617c Add linux-next specific files for 20221025 Error/Warning reports: https://lore.kernel.org/linux-mm/202210110857.9s0txvnn-...@intel.com https://lore.kernel.org/linux-mm/202210240729.zs46cfzo-...@intel.com https://lore.kernel.org/linux-mm/202210251946.et92yahg-...@intel.com https://lore.kernel.org/llvm/202210260009.9qq1jxzi-...@intel.com Error/Warning: (recently discovered and may have been fixed) drivers/net/ethernet/broadcom/genet/bcmgenet.c:1497:5-13: ERROR: invalid reference to the index variable of the iterator on line 1475 drivers/scsi/pm8001/pm8001_sas.c:996 pm8001_abort_task() warn: variable dereferenced before check 'task' (see line 986) Unverified Error/Warning (likely false positive, please contact us if interested): ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined! ERROR: modpost: "ioremap" [drivers/net/ethernet/fujitsu/fmvj18x_cs.ko] undefined! ERROR: modpost: "ioremap" [drivers/tty/ipwireless/ipwireless.ko] undefined! ERROR: modpost: "iounmap" [drivers/net/ethernet/fujitsu/fmvj18x_cs.ko] undefined! ERROR: modpost: "iounmap" [drivers/tty/ipwireless/ipwireless.ko] undefined! mm/khugepaged.c:1729:7: warning: variable 'index' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] mm/khugepaged.c:1729:7: warning: variable 'nr' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- ia64-randconfig-c033-20221025 | `-- drivers-net-ethernet-broadcom-genet-bcmgenet.c:ERROR:invalid-reference-to-the-index-variable-of-the-iterator-on-line `-- x86_64-randconfig-m001-20221024 `-- drivers-scsi-pm8001-pm8001_sas.c-pm8001_abort_task()-warn:variable-dereferenced-before-check-task-(see-line-) clang_recent_errors |-- arm-randconfig-r013-20221024 | |-- drivers-phy-mediatek-phy-mtk-hdmi-mt2701.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(uns | |-- drivers-phy-mediatek-phy-mtk-hdmi-mt8173.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(uns | |-- drivers-phy-mediatek-phy-mtk-mipi-dsi-mt8173.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char: | |-- drivers-phy-mediatek-phy-mtk-mipi-dsi-mt8183.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char: | `-- fs-ntfs3-namei.c:warning:variable-uni1-is-used-uninitialized-whenever-if-condition-is-true |-- arm-randconfig-r014-20221024 | |-- drivers-phy-mediatek-phy-mtk-hdmi-mt2701.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(uns | |-- drivers-phy-mediatek-phy-mtk-hdmi-mt8173.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(uns | |-- drivers-phy-mediatek-phy-mtk-mipi-dsi-mt8173.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char: | |-- drivers-phy-mediatek-phy-mtk-mipi-dsi-mt8183.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char: | |-- drivers-phy-mediatek-phy-mtk-tphy.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(unsigned-c | `-- fs-ntfs3-namei.c:warning:variable-uni1-is-used-uninitialized-whenever-if-condition-is-true |-- hexagon-randconfig-r045-20221023 | |-- drivers-phy-mediatek-phy-mtk-hdmi-mt2701.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(uns | |-- drivers-phy-mediatek-phy-mtk-hdmi-mt8173.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char:(uns | |-- drivers-phy-mediatek-phy-mtk-mipi-dsi-mt8173.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char: | |-- drivers-phy-mediatek-phy-mtk-mipi-dsi-mt8183.c:warning:result-of-comparison-of-constant-with-expression-of-type-typeof-(_Generic((mask_)-char:(unsigned-char)-unsigned-char:(unsigned-char)-signed-char: | |--