netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: oe-kbuild-all@lists.linux.dev, stable@vger.kernel.org,
	Alexander Aring <alex.aring@gmail.com>,
	Stefan Schmidt <stefan@datenfreihafen.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Harry Morris <harrymorris12@gmail.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v3] ieee802154: ca8210: Fix a potential UAF in ca8210_probe
Date: Sun, 1 Oct 2023 15:19:46 +0800	[thread overview]
Message-ID: <202310011548.qyQMuodI-lkp@intel.com> (raw)
In-Reply-To: <20231001054949.14624-1-dinghao.liu@zju.edu.cn>

Hi Dinghao,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc3 next-20230929]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dinghao-Liu/ieee802154-ca8210-Fix-a-potential-UAF-in-ca8210_probe/20231001-135130
base:   linus/master
patch link:    https://lore.kernel.org/r/20231001054949.14624-1-dinghao.liu%40zju.edu.cn
patch subject: [PATCH] [v3] ieee802154: ca8210: Fix a potential UAF in ca8210_probe
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231001/202310011548.qyQMuodI-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231001/202310011548.qyQMuodI-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310011548.qyQMuodI-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ieee802154/ca8210.c: In function 'ca8210_register_ext_clock':
>> drivers/net/ieee802154/ca8210.c:2743:13: warning: unused variable 'ret' [-Wunused-variable]
    2743 |         int ret = 0;
         |             ^~~


vim +/ret +2743 drivers/net/ieee802154/ca8210.c

ded845a781a578 Harry Morris 2017-03-28  2731  
ded845a781a578 Harry Morris 2017-03-28  2732  /**
ded845a781a578 Harry Morris 2017-03-28  2733   * ca8210_register_ext_clock() - Register ca8210's external clock with kernel
ded845a781a578 Harry Morris 2017-03-28  2734   * @spi:  Pointer to target ca8210 spi device
ded845a781a578 Harry Morris 2017-03-28  2735   *
ded845a781a578 Harry Morris 2017-03-28  2736   * Return: 0 or linux error code
ded845a781a578 Harry Morris 2017-03-28  2737   */
ded845a781a578 Harry Morris 2017-03-28  2738  static int ca8210_register_ext_clock(struct spi_device *spi)
ded845a781a578 Harry Morris 2017-03-28  2739  {
ded845a781a578 Harry Morris 2017-03-28  2740  	struct device_node *np = spi->dev.of_node;
ded845a781a578 Harry Morris 2017-03-28  2741  	struct ca8210_priv *priv = spi_get_drvdata(spi);
ded845a781a578 Harry Morris 2017-03-28  2742  	struct ca8210_platform_data *pdata = spi->dev.platform_data;
ded845a781a578 Harry Morris 2017-03-28 @2743  	int ret = 0;
ded845a781a578 Harry Morris 2017-03-28  2744  
ded845a781a578 Harry Morris 2017-03-28  2745  	if (!np)
ded845a781a578 Harry Morris 2017-03-28  2746  		return -EFAULT;
ded845a781a578 Harry Morris 2017-03-28  2747  
ded845a781a578 Harry Morris 2017-03-28  2748  	priv->clk = clk_register_fixed_rate(
ded845a781a578 Harry Morris 2017-03-28  2749  		&spi->dev,
ded845a781a578 Harry Morris 2017-03-28  2750  		np->name,
ded845a781a578 Harry Morris 2017-03-28  2751  		NULL,
ded845a781a578 Harry Morris 2017-03-28  2752  		0,
ded845a781a578 Harry Morris 2017-03-28  2753  		pdata->extclockfreq
ded845a781a578 Harry Morris 2017-03-28  2754  	);
ded845a781a578 Harry Morris 2017-03-28  2755  
ded845a781a578 Harry Morris 2017-03-28  2756  	if (IS_ERR(priv->clk)) {
ded845a781a578 Harry Morris 2017-03-28  2757  		dev_crit(&spi->dev, "Failed to register external clk\n");
ded845a781a578 Harry Morris 2017-03-28  2758  		return PTR_ERR(priv->clk);
ded845a781a578 Harry Morris 2017-03-28  2759  	}
ded845a781a578 Harry Morris 2017-03-28  2760  
d0603f3c78f0aa Dinghao Liu  2023-10-01  2761  	return of_clk_add_provider(np, of_clk_src_simple_get, priv->clk);
ded845a781a578 Harry Morris 2017-03-28  2762  }
ded845a781a578 Harry Morris 2017-03-28  2763  

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

  reply	other threads:[~2023-10-01  7:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-01  5:49 [PATCH] [v3] ieee802154: ca8210: Fix a potential UAF in ca8210_probe Dinghao Liu
2023-10-01  7:19 ` kernel test robot [this message]
2023-10-05 18:25   ` Stefan Schmidt
2023-10-07  1:35     ` dinghao.liu

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=202310011548.qyQMuodI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex.aring@gmail.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=edumazet@google.com \
    --cc=harrymorris12@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=stefan@datenfreihafen.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;
as well as URLs for NNTP newsgroup(s).