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: <28564d1c-6620-b57f-84f8-0e6319974456@intel.com>
Date:   Fri, 12 Nov 2021 16:19:32 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Mansur Alisha Shaik <mansur@...eaurora.org>
CC:     <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        <linux-media@...r.kernel.org>, Stephen Boyd <swboyd@...omium.org>,
        Stanimir Varbanov <stanimir.varbanov@...aro.org>
Subject: drivers/media/platform/qcom/venus/core.c:377:2: warning: Called
 function pointer is null (null dereference)
 [clang-analyzer-core.CallAndMessage]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6b75d88fa81b122cce37ebf17428a849ccd3d0f1
commit: 9e8efdb5787986cc0d0134925cf5c4f001bb3f2e media: venus: core: vote for video-mem path
date:   12 months ago
config: riscv-randconfig-c006-20211001 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 962e503cc8bc411f7523cc393acae8aae425b1c4)
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
         # install riscv cross compiling tool for clang build
         # apt-get install binutils-riscv64-linux-gnu
         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e8efdb5787986cc0d0134925cf5c4f001bb3f2e
         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout 9e8efdb5787986cc0d0134925cf5c4f001bb3f2e
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 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/media/platform/qcom/venus/core.c:377:2: warning: Called function pointer is null (null dereference) [clang-analyzer-core.CallAndMessage]
            pm_ops->core_power(dev, POWER_ON);
            ^~~~~~~~~~~~~~~~~~
    drivers/media/platform/qcom/venus/core.c:358:6: note: Assuming field 'core_power' is null
            if (pm_ops->core_power) {
                ^~~~~~~~~~~~~~~~~~
    drivers/media/platform/qcom/venus/core.c:358:2: note: Taking false branch
            if (pm_ops->core_power) {
            ^
    drivers/media/platform/qcom/venus/core.c:365:6: note: Assuming 'ret' is not equal to 0
            if (ret)
                ^~~
    drivers/media/platform/qcom/venus/core.c:365:2: note: Taking true branch
            if (ret)
            ^
    drivers/media/platform/qcom/venus/core.c:366:3: note: Control jumps to line 377
                    goto err_cpucfg_path;
                    ^
    drivers/media/platform/qcom/venus/core.c:377:2: note: Called function pointer is null (null dereference)
            pm_ops->core_power(dev, POWER_ON);
            ^~~~~~~~~~~~~~~~~~


vim +377 drivers/media/platform/qcom/venus/core.c

af2c3834c8ca7c Stanimir Varbanov   2017-06-15  347
eb918f915f5bdf Arnd Bergmann       2017-07-17  348  static __maybe_unused int venus_runtime_suspend(struct device *dev)
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  349  {
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  350  	struct venus_core *core = dev_get_drvdata(dev);
7482a983dea3b8 Stanimir Varbanov   2019-12-05  351  	const struct venus_pm_ops *pm_ops = core->pm_ops;
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  352  	int ret;
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  353
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  354  	ret = hfi_core_suspend(core);
7482a983dea3b8 Stanimir Varbanov   2019-12-05  355  	if (ret)
7482a983dea3b8 Stanimir Varbanov   2019-12-05  356  		return ret;
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  357
21926d466e3a4f Mansur Alisha Shaik 2020-10-19  358  	if (pm_ops->core_power) {
21926d466e3a4f Mansur Alisha Shaik 2020-10-19  359  		ret = pm_ops->core_power(dev, POWER_OFF);
07f8f22a33a9e3 Mansur Alisha Shaik 2020-04-10  360  		if (ret)
07f8f22a33a9e3 Mansur Alisha Shaik 2020-04-10  361  			return ret;
21926d466e3a4f Mansur Alisha Shaik 2020-10-19  362  	}
07f8f22a33a9e3 Mansur Alisha Shaik 2020-04-10  363
21926d466e3a4f Mansur Alisha Shaik 2020-10-19  364  	ret = icc_set_bw(core->cpucfg_path, 0, 0);
21926d466e3a4f Mansur Alisha Shaik 2020-10-19  365  	if (ret)
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  366  		goto err_cpucfg_path;
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  367
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  368  	ret = icc_set_bw(core->video_path, 0, 0);
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  369  	if (ret)
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  370  		goto err_video_path;
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  371
21926d466e3a4f Mansur Alisha Shaik 2020-10-19  372  	return ret;
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  373
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  374  err_video_path:
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  375  	icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0);
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  376  err_cpucfg_path:
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19 @377  	pm_ops->core_power(dev, POWER_ON);
9e8efdb5787986 Mansur Alisha Shaik 2020-10-19  378
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  379  	return ret;
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  380  }
af2c3834c8ca7c Stanimir Varbanov   2017-06-15  381

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ