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]
Date:   Wed, 25 Aug 2021 23:31:59 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Mihail Chindris <mihail.chindris@...log.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        <linux-iio@...r.kernel.org>
CC:     <clang-built-linux@...glegroups.com>, <kbuild-all@...ts.01.org>,
        <lars@...afoo.de>, <Michael.Hennerich@...log.com>,
        <jic23@...nel.org>, <nuno.sa@...log.com>,
        <dragos.bogdan@...log.com>, <alexandru.ardelean@...log.com>
Subject: Re: [PATCH v4 1/6] iio: Add output buffer support

Hi Mihail,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 94a853eca720ac9e385e59f27e859b4a01123f58]

url:    https://github.com/0day-ci/linux/commits/Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349
base:   94a853eca720ac9e385e59f27e859b4a01123f58
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-c007-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
reproduce (this is a W=1 build):
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # https://github.com/0day-ci/linux/commit/b4f124803ed8bfe5936c756ed4c7aa9124a1468a
         git remote add linux-review https://github.com/0day-ci/linux
         git fetch --no-tags linux-review Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349
         git checkout b4f124803ed8bfe5936c756ed4c7aa9124a1468a
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

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


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/iio/industrialio-buffer.c:325:9: warning: Called function pointer is null (null dereference) [clang-analyzer-core.CallAndMessage]
            return buffer->access->remove_from(buffer, data);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/iio/industrialio-buffer.c:322:6: note: Assuming 'buffer' is non-null
            if (!buffer || !buffer->access || buffer->access->remove_from)
                ^~~~~~~
    drivers/iio/industrialio-buffer.c:322:6: note: Left side of '||' is false
    drivers/iio/industrialio-buffer.c:322:17: note: Assuming field 'access' is non-null
            if (!buffer || !buffer->access || buffer->access->remove_from)
                           ^~~~~~~~~~~~~~~
    drivers/iio/industrialio-buffer.c:322:6: note: Left side of '||' is false
            if (!buffer || !buffer->access || buffer->access->remove_from)
                ^
    drivers/iio/industrialio-buffer.c:322:36: note: Assuming field 'remove_from' is null
            if (!buffer || !buffer->access || buffer->access->remove_from)
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/iio/industrialio-buffer.c:322:6: note: Assuming pointer value is null
            if (!buffer || !buffer->access || buffer->access->remove_from)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/iio/industrialio-buffer.c:322:2: note: Taking false branch
            if (!buffer || !buffer->access || buffer->access->remove_from)
            ^
    drivers/iio/industrialio-buffer.c:325:9: note: Called function pointer is null (null dereference)
            return buffer->access->remove_from(buffer, data);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +325 drivers/iio/industrialio-buffer.c

d2f0a48f36aea3 Lars-Peter Clausen 2013-10-04  319
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  320  int iio_buffer_remove_sample(struct iio_buffer *buffer, u8 *data)
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  321  {
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  322  	if (!buffer || !buffer->access || buffer->access->remove_from)
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  323  		return -EINVAL;
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  324
b4f124803ed8bf Lars-Peter Clausen 2021-08-20 @325  	return buffer->access->remove_from(buffer, data);
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  326  }
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  327  EXPORT_SYMBOL_GPL(iio_buffer_remove_sample);
b4f124803ed8bf Lars-Peter Clausen 2021-08-20  328

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ