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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 1 Dec 2020 21:18:02 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Daniel Scally <djrscally@...il.com>,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-i2c@...r.kernel.org,
        linux-media@...r.kernel.org, devel@...ica.org
Cc:     lkp@...el.com, kbuild-all@...ts.01.org, rjw@...ysocki.net,
        lenb@...nel.org, gregkh@...uxfoundation.org,
        mika.westerberg@...ux.intel.com
Subject: Re: [PATCH 06/18] software_node: amend
 software_node_unregister_node_group() to perform unregistration of array in
 reverse order to be consistent with software_node_unregister_nodes()

Hi Daniel,

url:    https://github.com/0day-ci/linux/commits/Daniel-Scally/Add-functionality-to-ipu3-cio2-driver-allowing-software_node-connections-to-sensors-on-platforms-designed-for-Windows/20201130-214014
base:   git://linuxtv.org/media_tree.git master
config: i386-randconfig-m021-20201130 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

smatch warnings:
drivers/base/swnode.c:785 software_node_unregister_node_group() error: uninitialized symbol 'i'.

vim +/i +785 drivers/base/swnode.c

02094d54870590a Andy Shevchenko 2020-04-08  778  void software_node_unregister_node_group(const struct software_node **node_group)
02094d54870590a Andy Shevchenko 2020-04-08  779  {
02094d54870590a Andy Shevchenko 2020-04-08  780  	unsigned int i;
02094d54870590a Andy Shevchenko 2020-04-08  781  
02094d54870590a Andy Shevchenko 2020-04-08  782  	if (!node_group)
02094d54870590a Andy Shevchenko 2020-04-08  783  		return;
02094d54870590a Andy Shevchenko 2020-04-08  784  
7c7577c82672f0a Daniel Scally   2020-11-30 @785  	while (node_group[i]->name)
                                                                          ^
The "i" is never initialized.

7c7577c82672f0a Daniel Scally   2020-11-30  786  		i++;
7c7577c82672f0a Daniel Scally   2020-11-30  787  
7c7577c82672f0a Daniel Scally   2020-11-30  788  	while (i--)
9dcbac84244f32e Andy Shevchenko 2020-06-22  789  		software_node_unregister(node_group[i]);

It's a strange thing that they can only be unregistered in reverse
order...  Walter Harms is right when he points out that programmers are
notoriously bad at counting backwards.

02094d54870590a Andy Shevchenko 2020-04-08  790  }

---
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" (32286 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ