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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <49db8904-e10d-4c91-be72-3dc182fb6e39@suswa.mountain>
Date:   Mon, 4 Dec 2023 09:55:19 +0300
From:   Dan Carpenter <dan.carpenter@...aro.org>
To:     oe-kbuild@...ts.linux.dev,
        Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: arch/nios2/kernel/time.c:223 nios2_timer_get_base_and_freq() warn:
 '*base' from of_iomap() not released on lines: 220.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   33cc938e65a98f1d29d0a18403dbbee050dcad9a
commit: dd1364a7439be4d20f87637a72eb7bd4553827f0 clocksource/drivers/nios2: Convert init function to return error
config: nios2-randconfig-r081-20231120 (https://download.01.org/0day-ci/archive/20231204/202312040334.l78lahzX-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231204/202312040334.l78lahzX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202312040334.l78lahzX-lkp@intel.com/

New smatch warnings:
arch/nios2/kernel/time.c:223 nios2_timer_get_base_and_freq() warn: '*base' from of_iomap() not released on lines: 220.

Old smatch warnings:
internal error: arch/nios2/include/asm/irqflags.h:25 SQL error #2: near "and": syntax error
internal error: arch/nios2/include/asm/irqflags.h:25 SQL: 'select * from return_states where  and type = 1044 and parameter = -1 and key = '$' limit 1;'
arch/nios2/kernel/time.c:139 nios2_timer_config() warn: inconsistent indenting

vim +223 arch/nios2/kernel/time.c

dd1364a7439be4 Daniel Lezcano 2016-06-07  209  static int __init nios2_timer_get_base_and_freq(struct device_node *np,
4182de9e6356c0 Ley Foon Tan   2014-11-06  210  				void __iomem **base, u32 *freq)
4182de9e6356c0 Ley Foon Tan   2014-11-06  211  {
4182de9e6356c0 Ley Foon Tan   2014-11-06  212  	*base = of_iomap(np, 0);
dd1364a7439be4 Daniel Lezcano 2016-06-07  213  	if (!*base) {
dd1364a7439be4 Daniel Lezcano 2016-06-07  214  		pr_crit("Unable to map reg for %s\n", np->name);
dd1364a7439be4 Daniel Lezcano 2016-06-07  215  		return -ENXIO;
dd1364a7439be4 Daniel Lezcano 2016-06-07  216  	}
dd1364a7439be4 Daniel Lezcano 2016-06-07  217  
dd1364a7439be4 Daniel Lezcano 2016-06-07  218  	if (of_property_read_u32(np, "clock-frequency", freq)) {
dd1364a7439be4 Daniel Lezcano 2016-06-07  219  		pr_crit("Unable to get %s clock frequency\n", np->name);
dd1364a7439be4 Daniel Lezcano 2016-06-07  220  		return -EINVAL;

Over the weekend the kbuild bot started going through some truly ancient
warnings.  Apparently we're supposed to iounmap() on this error path.

dd1364a7439be4 Daniel Lezcano 2016-06-07  221  	}
4182de9e6356c0 Ley Foon Tan   2014-11-06  222  
dd1364a7439be4 Daniel Lezcano 2016-06-07 @223  	return 0;
4182de9e6356c0 Ley Foon Tan   2014-11-06  224  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ