From: kernel test robot <lkp@intel.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>,
ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com,
davem@davemloft.net, kuba@kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiasheng Jiang <jiasheng@iscas.ac.cn>
Subject: Re: [PATCH] sfc_ef100: potential dereference of null pointer
Date: Thu, 16 Dec 2021 00:27:19 +0800 [thread overview]
Message-ID: <202112160025.8uELAreL-lkp@intel.com> (raw)
In-Reply-To: <20211215094141.164417-1-jiasheng@iscas.ac.cn>
Hi Jiasheng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc5 next-20211214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jiasheng-Jiang/sfc_ef100-potential-dereference-of-null-pointer/20211215-174422
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5472f14a37421d1bca3dddf33cabd3bd6dbefbbc
config: arm64-randconfig-r021-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160025.8uELAreL-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/fc56ac03164889a206ee1b65187a8be7aa7b0f04
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jiasheng-Jiang/sfc_ef100-potential-dereference-of-null-pointer/20211215-174422
git checkout fc56ac03164889a206ee1b65187a8be7aa7b0f04
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/ethernet/sfc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/sfc/ef100_nic.c:608:25: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct ef100_nic_data *nic_data = efx->nic_data;
^
1 warning generated.
vim +608 drivers/net/ethernet/sfc/ef100_nic.c
b593b6f1b492170 Edward Cree 2020-08-03 599
b593b6f1b492170 Edward Cree 2020-08-03 600 static size_t ef100_update_stats(struct efx_nic *efx,
b593b6f1b492170 Edward Cree 2020-08-03 601 u64 *full_stats,
b593b6f1b492170 Edward Cree 2020-08-03 602 struct rtnl_link_stats64 *core_stats)
b593b6f1b492170 Edward Cree 2020-08-03 603 {
b593b6f1b492170 Edward Cree 2020-08-03 604 __le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
fc56ac03164889a Jiasheng Jiang 2021-12-15 605 if (!mc_stats)
fc56ac03164889a Jiasheng Jiang 2021-12-15 606 return 0;
fc56ac03164889a Jiasheng Jiang 2021-12-15 607
b593b6f1b492170 Edward Cree 2020-08-03 @608 struct ef100_nic_data *nic_data = efx->nic_data;
b593b6f1b492170 Edward Cree 2020-08-03 609 DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
b593b6f1b492170 Edward Cree 2020-08-03 610 u64 *stats = nic_data->stats;
b593b6f1b492170 Edward Cree 2020-08-03 611
b593b6f1b492170 Edward Cree 2020-08-03 612 ef100_common_stat_mask(mask);
b593b6f1b492170 Edward Cree 2020-08-03 613 ef100_ethtool_stat_mask(mask);
b593b6f1b492170 Edward Cree 2020-08-03 614
b593b6f1b492170 Edward Cree 2020-08-03 615 efx_nic_copy_stats(efx, mc_stats);
b593b6f1b492170 Edward Cree 2020-08-03 616 efx_nic_update_stats(ef100_stat_desc, EF100_STAT_COUNT, mask,
b593b6f1b492170 Edward Cree 2020-08-03 617 stats, mc_stats, false);
b593b6f1b492170 Edward Cree 2020-08-03 618
b593b6f1b492170 Edward Cree 2020-08-03 619 kfree(mc_stats);
b593b6f1b492170 Edward Cree 2020-08-03 620
b593b6f1b492170 Edward Cree 2020-08-03 621 return ef100_update_stats_common(efx, full_stats, core_stats);
b593b6f1b492170 Edward Cree 2020-08-03 622 }
b593b6f1b492170 Edward Cree 2020-08-03 623
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
parent reply other threads:[~2021-12-15 16:34 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20211215094141.164417-1-jiasheng@iscas.ac.cn>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202112160025.8uELAreL-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=habetsm.xilinx@gmail.com \
--cc=jiasheng@iscas.ac.cn \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox