lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008121120.vk5L4TOM%lkp@intel.com>
Date:   Wed, 12 Aug 2020 11:09:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/realtek/r8169_main.c:1872
 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: 2815b30535a0613ee07d477d0c628100f40b6059 r8169: merge scale for tx and rx irq coalescing
date:   3 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

New smatch warnings:
drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'

Old smatch warnings:
drivers/net/ethernet/realtek/r8169_main.c:1837 rtl_get_coalesce() warn: passing a valid pointer to 'PTR_ERR'

vim +/PTR_ERR +1872 drivers/net/ethernet/realtek/r8169_main.c

  1862	
  1863	/* choose appropriate scale factor and CPlusCmd[0:1] for (speed, nsec) */
  1864	static int rtl_coalesce_choose_scale(struct rtl8169_private *tp, u32 nsec,
  1865					     u16 *cp01)
  1866	{
  1867		const struct rtl_coalesce_info *ci;
  1868		u16 i;
  1869	
  1870		ci = rtl_coalesce_info(tp);
  1871		if (IS_ERR(ci))
> 1872			return PTR_ERR(ci);
  1873	
  1874		for (i = 0; i < 4; i++) {
  1875			if (nsec <= ci->scale_nsecs[i] * RTL_COALESCE_T_MAX) {
  1876				*cp01 = i;
  1877				return ci->scale_nsecs[i];
  1878			}
  1879		}
  1880	
  1881		return -EINVAL;
  1882	}
  1883	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (30527 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ